mardi 5 mai 2015

How to create this complex Result using SQL

I have a sales amount table need to generate a report like this in sql server

QTY Amount  % Amount
5   5000    35%
10  10000   65%
15  15000   100%

The last row is total of all from top two rows.

35% is 5000/15000
67% is 10000/15000

How can i create a query for this ?

Aucun commentaire:

Enregistrer un commentaire