oracle 分组统计后结果相减 实例
create table TEST1
(
ID VARCHAR2(10),
SALARY NUMBER(4)
)
-----------------------------
insert into test1 (ID, SALARY)
values ('1', 32);
insert into test1 (ID, SALARY)
values ('2', 56);
insert into test1 (ID, SALARY)
values ('1', 56);
insert into test1 (ID, SALARY)
values ('2', 78);
insert into test1 (ID, SALARY)
values ('1', 78);
-------------------------------
select lead(cont1,1,cont1) over (order by cont1)-lead(cont1,0,1) over (order by cont1) as cha,cont1 from (select id, count(1) as cont1
from test1 t3 group by id)
相关文档:
Oracle全文索引的WORDLIST属性用来设置模糊查询和同词根查询,另外WORDLIST属性还支持通配符查询。
Oracle的WORDLIST属性只有BASIC_WORDLIST一种,下面看一个BASIC_WORDLIST的例子:
1.Stemmer attrib