I have the following query that returns 1738 rows:
select a.street, b.id
from TableA a
left join TableB b on a.city = b.city
order by a.street
Executing the following query, returns 1073 rows:
select distinct street from TableA
How can I return distinct rows in my first query?
I tried using select distinct a.street, b.id, but this returns 1090 rows.
Do I need another join?
1 Answer