가이드 연계 퀴즈 · 중간 레벨
AI 퀴즈로 SQL 조인을 이해하는 방법
소규모 고객 및 주문 사례를 사용하여 내부 및 외부 조인 결과, 다대다 행 곱셈 및 필터 배치를 연습합니다.
질문 1 의 8
Ada에는 두 개의 주문이 있고 Ben에는 주문이 없습니다. 추가 필터링 전에 가이드의 고객-주문 왼쪽 조인에서 나온 행 수는 몇 개입니까?
모든 질문 미리보기8 질문
퀴즈를 풀면 정답과 설명이 나타납니다.
- Ada에는 두 개의 주문이 있고 Ben에는 주문이 없습니다. 추가 필터링 전에 가이드의 고객-주문 왼쪽 조인에서 나온 행 수는 몇 개입니까?
- Two, because only orders are counted
- One, because customer names are unique
- Three, including Ben's unmatched row
- Four, because every customer gets two rows
- 3개의 주문 라인과 2개의 프로모션 레코드가 제품 키를 공유합니다. 해당 키에 대한 동등 조인은 몇 개의 일치 조합을 생성합니까?
- 여섯
- 다섯
- 세
- 2개
- 보고서에는 고객당 하나의 행이 포함되어야 하지만 현재 조인은 주문당 하나의 행을 반환합니다. 쿼리를 수락하기 전에 무엇을 명확히 해야 합니까?
- Whether sorting the result by customer removes the extra order rows
- Whether selecting fewer order columns alone changes the output grain
- Whether renaming the customer key makes it unique in the joined result
- The intended output grain and how order data should be aggregated
- 왼쪽 조인은 배송된 주문 없이 고객을 유지해야 합니다. 배송된 주문과의 일치를 제한하는 조건은 어디에 속합니까?
- In a WHERE condition that rejects all null right-side values
- In the ON condition that controls which orders match
- Only in the final ORDER BY clause
- In a DISTINCT operation after all orders have been joined
- 다대다 조인 후 부풀려진 합계에 대한 신뢰할 수 있는 일반적인 수정 방법으로 DISTINCT를 추가하는 것이 아닌 이유는 무엇입니까?
- DISTINCT establishes one row per customer regardless of which columns are selected
- DISTINCT makes each join-key value unique before matching occurs
- It may hide duplicate-looking results without correcting the matching or aggregation logic
- DISTINCT guarantees that an aggregate computed after the join used each source amount once
- Which join preserves unmatched rows from both input tables?
- A full outer join
- An inner join
- A left join in every table order
- A self join regardless of its join type
- After a left join, why can COUNT(*) differ from COUNT of a non-null right-side identifier?
- COUNT(*) counts only distinct customers
- COUNT of the identifier includes every null-extended row
- COUNT(*) automatically removes duplicate join keys
- COUNT(*) includes unmatched output rows while the identifier count excludes their nulls
- An AI explanation assumes ordinary equality will match two null join-key values. How should that claim be treated?
- Accept it because both sides contain the same missing-value marker
- Correct it using the database's null semantics
- Accept it because an outer join changes equality comparisons involving null
- Assume two null keys match whenever both source columns have the same data type