Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[dashboard_tst-dashboard_pieTopProducts_getPanelChart]
- @username nvarchar(128)
- AS
- BEGIN
- select 'pie' Type,
- '' Title,
- 400 Width,
- 400 Height
- select top 5
- name Title,
- (select sum(cnt) from tst_orders where productID = tst_products.id) Value,
- '' Color
- from tst_products
- order by (select sum(cnt) from tst_orders where productID = tst_products.id) desc
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement