I have a query on a Left join, where the Table who joins can contain zero rows. The problem is that if I select from that, then there are no rows where the join table contains zero rows. How can I select it then anyway?
Here is my query
SELECT server.id
, COALESCE( AVG( playerData.player ) , 0 ) AS average
FROM server
LEFT JOIN playerData ON server.id = playerData.serverID
AND (playerData.timestamp > UNIX_TIMESTAMP( ) -10000)
The playerData table stores in one row how many people were on a server on a specific time. And multiple rows of this needs to be calculated to an average and this needs to be joined to the other query. When I omit the secound select column it gives me all rows (like it should), otherwise it only shows a result where also appropriate rows in the playerData table exists.
Additional Table data: playerData Table:

For the other table only the id column is important in this case.
GROUP BY.