Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- (select count(*) from fight where fight.winner_id = user_id) as w,
- (select count(*) from user_fight INNER JOIN fight ON (fight.id = user_fight.fight_id and user_fight.user_id = user_id and fight.draw = 1 ) as d,
- (select count(*) from user_fight INNER JOIN fight ON (fight.id = user_fight.fight_id and user_fight.user_id = user_id and fight.winner_id != user_id ) as l
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement