Having the following two tables:
Players
id | player
-----------
1 | ABC
2 | CDE
3 | FGH
Games
id | player_id | created_at
-------------------------------------
1 | 1 | 2019-09-01 15:00:00
2 | 1 | 2019-09-15 17:00:00
3 | 2 | 2019-10-01 15:00:00
4 | 2 | 2019-10-05 18:00:00
5 | 2 | 2019-10-12 15:00:00
How can I select all players and show their latest if they have any, or NULL if they never played a game? Something like this with this example:
player_id | created_at
--------------------------------
1 | 2019-09-15 17:00:00
2 | 2019-10-12 15:00:00
3 | NULL