SELECT *
FROM orders
JOIN subscriptions
ON orders.subscription_id = subscriptions.subscription_id;
FROM에 위치한 Table 'orders'에 Table 'subscriptions'을 합치려면
JOIN을 사용한다.
ON은 같은 각각의 Table에 Column 이 같으면 이라는 조건을 넣는다.
Where은 ON 에 기입한 각각의 Table에 Column 중 같은 값이 있는 부분을 기준으로 출력한다.
SELECT *
FROM orders
JOIN subscriptions
ON orders.subscription_id = subscriptions.subscription_id
WHERE subscriptions.description = 'Fashion Magazine';