select info.id,info.name,info.weight,sum(game.count) as total from (game inner join info on game.person_id = info.id) group by info.name where total > 25 and info.weight < 50;
select info.id,info.name,info.weight,sum(game.count) > 25 as total from (game inner join info on game.person_id = info.id) where info.weight < 50;
select *,info.weight,sum(game.count) as total from (game join info on game.person_id = info.id and info.weight < 50) group by info.id having sum(game.count) > 25;
select info.id,info.name,info.weight,sum(game.count) as total from (game inner join info on game.person_id = info.id) where info.weight < 50 group by info.name having sum(game.count) > 25;