So, I have the following SELECT statements:
SELECT COUNT(A.Award) AS US, SUBSTRING(CAST(M.Year as char(4)), 0 , 4) AS Decade FROM Movies M, Awards A WHERE {SOME WHERE CLAUSE} GROUP BY Decade;
and
SELECT COUNT(*) AS Total, SUBSTRING(CAST(A2.Year as char(4)), 0 , 4) AS Decade FROM Awards A2 WHERE {SOME WHERE CLAUSE} GROUP BY Decade;
The first is the "generation" of a table with columns (US, Decade), and the second is the "generation" of another table with columns (Total, Decade). I want to join these two tables to get a table (US, Total, Decade). How can i do this?
source share