Can someone point me to the right direction what i need to read? ...
I have two tables. 1st with customer id and customer name. 2nd with customer id and date of call to customer. I used LEFT JOIN
to get a list for each customern with all calls to him. Like this:
1, Max Mustermann, 2019-05-22
1, Max Mustermann, 2019-05-20 (<- I don't want this row to appear.)
2, Ilse Meier,
I used LEFT JOIN
to get customers without calls too.
Now I want this result with only the latest call.
For one call (to get the latest) I could do:
SELECT * FROM calls ORDER BY call_date DESC LIMIT 1;
I'm stuck. What do I need to read about?