Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- COUNT(events.event_id) AS total_events,
- COUNT(matches.fight_id) AS total_matches,
- COUNT(players.fighter_id) AS total_players,
- COUNT(DISTINCT events.organization) AS total_organizations,
- COUNT(DISTINCT players.country) AS total_countries
- FROM
- events, matches, players
- SELECT
- COUNT(events.event_id) AS total_events,
- COUNT(DISTINCT events.organization) AS total_organizations
- FROM
- events;
- SELECT
- COUNT(matches.fight_id) AS total_matches
- FROM
- matches;
- SELECT
- COUNT(players.fighter_id) AS total_players,
- COUNT(DISTINCT players.country) AS total_countries
- FROM
- players;
- CREATE INDEX "events_organization" ON events (organization);
- CREATE INDEX "players_country" ON events (country);
Add Comment
Please, Sign In to add comment