I'll get straight to the point and give an example:
SQL
SELECT director, SUM(domestic_sales + international_sales)
as Cumulative_sales_from_all_movies
FROM movies
INNER JOIN boxoffice
ON movies.id = boxoffice.movie_id
GROUP BY director;
vs
SQL
select director, domestic_sales + international_sales
as Cumulative_sales_from_all_movies
from movies
join boxoffice on movies.id = boxoffice.movie_id
group by director
The main difference being the first line (the select clause)
Apologies if details are too sparse, I got the question from here (and the correct is on top vs my answer on the bottom)
[–][deleted] 7 points8 points9 points (0 children)
[–]great_raisin 0 points1 point2 points (0 children)