You can use UNION ALL and sum the values you need by each column:
This is your SQL. Note it will run both queries with union all and then sum each value. We will use the "0" (zero) trick to ignore the "wrong" table:
SELECT x.player, SUM(x.cricket_score) as cricket_score, SUM(x.football_score) as football_score FROM (
SELECT player, SUM(score) as cricket_score, 0 as football_score
FROM cricket_table
WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'
GROUP BY player
UNION ALL
SELECT player, 0 as cricket_score, SUM(score) as football_score
FROM football_table
WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'
GROUP BY player
) x
GROUP BY x.player
And applying to the code:
$query = $db->prepare(" SELECT x.player, SUM(x.cricket_score) as cricket_score, SUM(x.football_score) as football_score FROM (
SELECT player, SUM(score) as cricket_score, 0 as football_score
FROM cricket_table
WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'
GROUP BY player
UNION ALL
SELECT player, 0 as cricket_score, SUM(score) as football_score
FROM football_table
WHERE dateby BETWEEN '2020-01-01' AND '2020-03-01'
GROUP BY player
) x
GROUP BY x.player");
$query->execute();
echo '<table><tr><th>Player Name</th><th>Cricket</th><th>Football</th></tr>';
while($row = $query->fetch(PDO:: FETCH_ASSOC) ) {
echo '<tr>
<td>'.$row['player'].'</td>
<td>'.$row['cricket_score'].'</td>
<td>'.$row['football_score'].'</td>
</tr>';
}
echo '</table>';
With this SQL you will get the values already set by cricket or football.