This is my query:
select distinct *
from purchase_records a
inner join purchase_items b on a.id = b.purchase_id
left join transactions c on a.id= c.purchase_id
It fetches records from two tables. From the left it gets one record, and from the right it gets the number of records which are more then one.
The issue is that when the table returns the record, it matches the exact record but repeat right side of the row according to the left side of row.
How can i get one record in the left and many records in the right? I want my left join to show one record, and right to show as many records as there are in the database.