Free for PREMIUM members
The revolutionary project management tool is here! Plan visually with a single glance and make sure your projects get done.
select Product,clientid,sum(qt) as qt
group by product,clientid
Select client,identity(int,1,1) as rowno
select distinct client
from #temp as t
) as x
declare @cid int
declare @sql varchar(8000)
set @cid = 1
set @sql='Select product'
while exists (select rowno from #temp1 where rowno=@cid)
select @SQL=@SQL+',SUm(Case when client='''+Client+''' then qt else null end) as ['+client+']'
Set @sql=@sql+',sum(qt) as [sum] from #temp group by product order by 1'
Open in new window
With monday.com’s project management tool, you can see what everyone on your team is working in a single glance. Its intuitive dashboards are customizable, so you can create systems that work for you.