Query Library

Alan Karben submitted this query on: March 03, 2008 1:09pm EST
TITLE Get all teams and final scores for a game
SPORTS ALL SPORTS
QUERY SELECT 
     * 
FROM 
     events, 
     participants_events 
WHERE 
         events.event_key = 'l.nfl.com-2007-e.2153' 
     AND participants_events.event_id = events.id;
DESCRIPTION gets scores
DBs TESTED MySQL
ADDITIONAL NOTES
Comments
on July 07, 2008 3:28am EDT manish wrote:
Metadata: DB Tested: MySQL
Query:
n/a

"yhfh"

on December 03, 2009 2:39pm EST Casey Trauer wrote:
Metadata: DB Tested: MySQL
Query:
SELECT  dn.full_name, t.team_key, pe.score
FROM events as e
JOIN participants_events pe ON (pe.event_id = e.id AND pe.participant_type = 'teams')
JOIN display_names dn ON (dn.entity_id = pe.participant_id AND dn.entity_type = 'teams')
JOIN teams t ON pe.participant_id = t.id
WHERE e.event_key = 'l.nfl.com-2009-e.2979';

"The first query needs to be modified because it also can potentially return all players involved in the game. This query returns only teams as well as the team names."