so_damn_insane (so_damn_insane) rakstīja, @ 2008-09-24 17:50:00 |
|
|||
Entry tags: | ora |
kaut kas jauns un jauks
Ilustrējam atšķirību starp RANK un DENSE_RANK.
SELECT dense_rank(3) within group (order by v2 )
FROM (
select 1 as v2 from dual
union all
select 2 as v2 from dual
union all
select 2 as v2 from dual
union all
select 4 as v2 from dual
union all
select 5 as v2 from dual);
SELECT rank(3) within group (order by v2 )
FROM (
select 1 as v2 from dual
union all
select 2 as v2 from dual
union all
select 2 as v2 from dual
union all
select 4 as v2 from dual
union all
select 5 as v2 from dual);