I can produce the same result with the where clause inside the join or the where clause outside the join, like:
select *
from a
join b on b.id = a.id and b.type = 1
or
select *
from a
join b on b.id = a.id
where
b.type = 1
Whats better? Why?
ps: feel free to edit my title, i dont know how to proper name the question.
GROUP BY ALLoption is used.