Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[dashboard_tst-dashboard_barSumOrders_getPanelChart]
- @username nvarchar(128)
- AS
- BEGIN
- declare @days nvarchar(max)
- select @days = '13,14,15,16,17,18,19,20,21,22,23,24,25,26,27,28'
- declare @ndays table (n int)
- insert into @ndays
- select value from dbo.split(@days,',') where value <> 0
- select 'bar' Type, 'March 2020' Title, 400 Width, 400 Height
- select n Title, (select cast(sum(cnt*price) as int) from tst_orders where created between '2020/03/13' and '2020/03/28' and day(created) = n) as Value, '#36b9cc' Color
- from @ndays
- END
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement