I’ve written a query that pulls out the average score per player who was in inning 4:
SELECT batsmen.player_id, AVG(score)
FROM batsmen
WHERE batsmen.inning_no=4
GROUP BY player_id;
But now I need to find the highest average score. obviously i could look at the output, orderby and easily see the highest average, but i would like a query that pulls it out for me.
I assume somehow i need to use
SELECT MAX(score);
with the result set received in my avg query above. Do I need to join/subquery?
Thanks
Theresa
Perhaps this will fill your needs: