Over the years I have written many stored procedures in which we had to do some sort of aggregation.
The traditional way would be to sum the value and put in a group by clause at the end of the sql statement.
I found that I landed up building monster queries in order to do something simple.
Then a couple years back I came accross the OVER clause.
The traditional way would be to sum the value and put in a group by clause at the end of the sql statement.
I found that I landed up building monster queries in order to do something simple.
Then a couple years back I came accross the OVER clause.