Hello. Can someone tell me how I could turn this sql statement into a pivot table that
uses the Attorney, SumOfMatters, ...List of Trade Types... for column headers
and the row to have the Attorney and sumofmatters by [trade type]?
SELECT TOP (100) PERCENT ATTORNEY, COUNT([MATTER NUMBER]) AS [SumOfMatters], [trade type]
WHERE ([SELLER NAME] <> N'[general]') AND ([BUYER NAME] <> N'[general]') AND ([Closed Matters] <> 1) AND ([CLIENT NUMBER] <> 888) AND
([CLIENT NUMBER] <> 200)
GROUP BY ATTORNEY, [trade type]
HAVING (ATTORNEY IS NOT NULL)
Thanks in advance!