 <p>it looks complex but its simpler either</p> <pre><code>select * from (select event.id, event.title, schedule.event_date, schedule.price, event_id from schedule left join event on event.id=schedule.event_id group by event_date,event_id )s group by s.event_id; </code></pre>