Menu
Coddy logo textTech

Recap - Join

Coddy SQL 여정의 기초 섹션에 포함된 레슨 — 72개 중 45번째.

challenge icon

챌린지

중급

사용 가능한 테이블 및 컬럼:

  • <strong>orders</strong>: <strong>id</strong>, <strong>customer_id</strong>
  • <strong>products</strong>: <strong>id</strong>, <strong>unit_price</strong>, <strong>units_in_stock</strong>
  • <strong>order_items</strong>: <strong>id</strong>, <strong>order_id</strong>, <strong>product_id</strong>, <strong>quantity</strong>

단위 가격이 10 미만인 제품을 주문한 고객의 고객 ID를 찾고, 각 고객이 주문한 해당 저가 제품의 총 수량을 나열하세요.

다음 컬럼을 반환하세요:

  • customer_id
  • total_quantity (각 고객에 대해 단위 가격이 < 10인 제품의 수량 합계)

직접 해보기

기초의 모든 레슨