1

Topic: Grouping of a certain amount of lines

There was such question and how to group the data, for example till five lines?

2

Re: Grouping of a certain amount of lines

Zaknafeir;

SQL> ed
Wrote file afiedt.buf
1* select ceil (rownum/5) gr, sum (sal) ss, count (*) cc from emp e group by ceil (rownum/5)
SQL> /
GR SS CC
---------- ---------- ----------
1 7875 5
2 14800 5
3 6350 4

....
stax

3

Re: Grouping of a certain amount of lines

Stax;
Thanks big!