Skip to content
Advertisement

Need to handle custom query summation for group

I have this table name “TB1” contain of these columns :

I need a group with Bill.NO with sum column qty ,price from “TB1” to be like this :

What I tried to do , I wrote this query but not doing as I want :

Advertisement

Answer

Really, you should leave these kind of things to the presentation layer.

But you could hack it with ROW_NUMBER

User contributions licensed under: CC BY-SA
4 People found this is helpful
Advertisement