Answer the question
In order to leave comments, you need to log in
What is the best way to make a request for a selection?
There is such a database schema .
One purchase can be for several devices.
What is the best way to make a request for a selection of purchases by device (uuid + application_id). Or with 2 johns of norms?
select purchases.* from purchases
join device_purchase dp on purchases.id = dp.purchase_id
join devices d on dp.device_id = d.id
where d.application_id = 114 and d.uuid = 'aaac606a-6182-de08-bace-53c939d00008';
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question