To express this as a mix:
select distinct a.id, a.title, a.description from my_table_name as a join another_table b on b.id = a.id where b.id = 1
Using distinct means getting the same results if another_table has the same identifier more than once, so the same row is not returned multiple times.
Note: if the combinations id, name and description in my_table_name are not unique, this query will not return duplicates such as the original query.
To ensure you get the same results, you need to make sure that the identifier in the other_table is unique. To do this as a join:
select a.id, a.title, a.description from my_table_name as a join (select distinct id from another_table) b on b.id = a.id where b.id = 1
source share