Three ways to join tables
Date: April 25th 2016
Last updated: April 25th 2016
Example 1 (WHERE CLAUSE)
SELECT
daily_revenue.dt,
daily_revenue.rev / daily_players.players
FROM daily_revenue
JOIN daily_players WHERE daily_revenue.dt = daily_players.dt;
Example 2 (USING CLAUSE)
SELECT
daily_revenue.dt,
daily_revenue.rev / daily_players.players
FROM daily_revenue JOIN daily_players USING (dt);
Example 3 (ON CLAUSE)
SELECT
daily_revenue.dt,
daily_revenue.rev / daily_players.players
FROM daily_revenue
JOIN daily_players ON daily_revenue.dt = daily_players.dt;