SQL Dynamic Pivot Table example

DECLARE @DynamicPivotQuery AS NVARCHAR(MAX);DECLARE @ColumnName AS NVARCHAR(MAX); SET @ColumnName= ‘[W’+CAST(DATEPART(wk,GETDATE()) as varchar(2))+’],[W’+ CAST(DATEPART(wk,GETDATE()+7) as varchar(2))+’],[W’+…

BlinkDB

BlinkDB is a massively parallel, approximate query engine for running interactive SQL queries on large…