All pastes #940456 Raw Edit

Untitled

public sql v1 · immutable
·published 2008-03-12 23:54 UTC
rendered paste body
SELECT team_id, data_type, SUM(value) FROM players INNER JOIN  match_data ON (match_data.player_id = players.id) WHERE players.id IN(select player_id from match_data where match_id = 7) GROUP BY team_id;