This is a follow up question to a previous question I got some GREAT help with linked below:
It seems we need help with grouping and sorting in order to get the report to display properly.
Attached is a sample of the report format we need along with the SQL to build the table, sample data and SQL query with pivot that currently works minus the grouping and sorting we need to match the report.
Any help you could provide is much appreciated.
Format we are trying to achieve:
SQL to build table: RE-Qry.txt
Pivot Query we are current using (unable to sort and group properly): RE-CurrentQry.txt
Sample Data in Excel: dbo-Capital-Projects-tbl.xlsx