How to do a join that removes values?
- by Georg
Customers Holidays
id | name customer_id | start | end
---+------ ------------+--------+------
1 | Peter 1 | 5 | 10
2 | Simon 1 | 15 | 20
3 | Mary 2 | 5 | 20
How should my SQL query look that out of start=11,end=14 I get these customers:
Peter
Mary
Is this even manageable with a simple SQL join, or do I need to use sub-queries?