Thursday, 10 October 2013

16. Display the sum of sales amount earned by each sales person and the sum of sales amount earned by the all the salespersons. (Use the AdventureWorks database)

select salesPersonID,sum(salesQuota)
as salesQuota from sales.salespersonQuotaHistory
group by rollup(salesPersonID)

No comments:

Post a Comment