Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- CREATE PROCEDURE [dbo].[dashboard_tst-dashboard_lineSumOrders_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 'line' Type,
- '' Title,
- 400 Width,
- 400 Height,
- @days as CommaLabels
- select 'March 2020' Title,
- (select stuff( (
- select ','+ X
- from (select isnull(cast((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 nvarchar),'0') as X
- from @ndays) t1
- for xml path(''), type
- ).value('.', 'varchar(max)'), 1, 1, ''
- )
- ) Value,
- '#6610f2' Color
- END
Add Comment
Please, Sign In to add comment