Hi Everyone,
I have below sql statement and even after correcting the formatting options it's not format well.
Line 3 I have manually formatted, but actual formatting done by developer is like from line 4 - 10.
Also Group By is required in line 12 but developer format put it in at line 12.
Please suggest how to fix it, also how to remove line number from sql developer (I have manually mentioned here for question but when I copy paste code from web i have to remove line numbers manually).
1 SELECT host
2 , COUNT(*) my_count
3 , SUM( COUNT(*) ) OVER( ORDER BY host ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW ) AS cum_count
4 , SUM(
5 COUNT(*)
6 ) OVER(
7 ORDER BY
8 host
9 ROWS BETWEEN UNBOUNDED PRECEDING AND UNBOUNDED FOLLOWING
10 ) AS tot_count
11 FROM apache_log GROUP BY
12 host