MySQL Nested Select Query?
问题 Ok, so I have the following query: SELECT MIN(`date`), `player_name` FROM `player_playtime` GROUP BY `player_name` I then need to use this result inside the following query: SELECT DATE(`date`) , COUNT(DISTINCT `player_name`) FROM `player_playtime /*Use previous query result here*/` GROUP BY DATE( `date`) DESC LIMIT 60 How would I go about doing this? 回答1: You just need to write the first query as a subquery (derived table), inside parentheses, pick an alias for it ( t below) and alias the