Query Library

Chris Hartjes submitted this query on: March 31, 2008 4:31pm EDT
TITLE Get links to all documents associated with a specific event
SPORTS ALL SPORTS
QUERY SELECT
     events.event_key,
     documents.doc_id,
     document_fixtures.fixture_key,
     document_fixtures.name
FROM
     document_fixtures_events, events, documents, document_fixtures
WHERE
         events.event_key = 'l.mlb.com-2007-e.BOS20070616'
     AND document_fixtures_events.event_id = events.id
     AND document_fixtures_events.document_fixture_id = document_fixtures.id
     AND document_fixtures_events.latest_document_id = documents.id
DESCRIPTION Use this query to figure out exactly what documents contain the information you need about a specfic event
DBs TESTED MySQL
ADDITIONAL NOTES