skip to Main Content

How to rewrite a query without a subquery – Postgresql

I have this query: select qt.id as id, ev.id as event_id, res.allocation_date as date from quota qt left join result res on qt.id=res.quota_fk and (res.allocation_date=(select max(res2.allocation_date) from result res2 where res2.quota_fk=qt.id)) left join event ev on qt.id=ev.quota_fk this query correctly…

VIEW QUESTION
Back To Top
Search