Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select driver, count(*) as number FROM
- (
- select map, driver, score
- from `mapstats_archive_0503201711032017`
- where score = (select max(score) from `mapstats_archive_0503201711032017` as f where f.map = `mapstats_archive_0503201711032017`.map and ( map like "NGUI-drift%" or map like "NGUI-speedtrap%"))
- UNION ALL
- select map, driver, score
- from `mapstats_archive_0503201711032017`
- where score = (select min(score) from `mapstats_archive_0503201711032017` as f where f.map = `mapstats_archive_0503201711032017`.map and not ( map like "NGUI-drift%" or map like "NGUI-speedtrap%"))
- ) as tab GROUP BY driver ORDER BY number desc
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement