Can nest the first within the second: FROM (first query sql here) AS Query1;

Instead of WHERE clause, specify fields in PIVOT clause: PIVOT Process IN('Recovery','Extraction','Forming');