Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- select ps1.player_id, ps1.player_name, ps2.erep_day,
- (ps1.sky_hero - ps2.sky_hero) as sky_heroes,
- (ps1.battle_hero - ps2.battle_hero) as battle_heroes,
- (ps1.player_exp - ps2.player_exp) as experience_gained,
- (ps1.true_patriot - ps2.true_patriot) as true_patriots
- from player_stats ps1
- join player_stats ps2 on ps2.player_id = ps1.player_id and ps2.erep_day = (select max(erep_day) from player_stats) - 1
- where ps1.erep_day = (select max(erep_day) from player_stats)
- group by
- ps1.player_id,
- ps1.player_name,
- ps2.erep_day,
- ps1.sky_hero - ps2.sky_hero,
- ps1.battle_hero - ps2.battle_hero,
- ps1.player_exp - ps2.player_exp,
- ps1.true_patriot - ps2.true_patriot
- order by experience_gained desc;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement