This is the syntax that I have and It presents me with 'No column name was specified for column 1 of 'A'
; With A As ( Select outcome, Count(UserID), location, '' As [One], SUM(value1+value2+value3) As [Total Value] From database1 Where salemadeby ('George', 'Jan', 'Steve') And (Coalesce(approved, shipped, paid) Is not null) Group by outcome, location ) Select outcome,[George],[Jan],[Steve] From A As ready Pivot (Count(UserID) For outcome IN ([George],[Jan],[Steve])) As Final
And my desired output (or what I am trying to see is outcome on the left side, location on the top and Count ofuserid filling in the grid.
- Edited by IndigoMontoya 11 hours 58 minutes ago