결과를 표로 확인하기
products.category → categories.category_name| name | category |
|---|
| category_name | shipping_fee |
|---|
연결된 레코드 없음 → NULL · NULL
연결되는 행 없음 → NULL
SQL을 실행한 뒤 정답을 확인해 보세요.
원본 데이터 · products · 4행
가격 변경은 이 브라우저의 조회에만 적용됩니다. Supabase 원본 데이터는 그대로 유지됩니다.
Spending per customer · COALESCE
From Customers(customers), show Name(customers.name) → use the next value if NULL (sum ((Quantity(order_items.quantity) * Unit price at order (KRW)(order_items.unit_price))), 0) in this order. Connect the data using LEFT JOIN · Orders(orders). Match rows when ID(customers.id) = Customer ID(orders.customer_id) and Order status(orders.status) = 'Paid'. At the JOIN step, keep all left-table rows; unmatched right-side values are NULL. Connect the data using LEFT JOIN · Order items(order_items). Match rows when ID(orders.id) = Order ID(order_items.order_id). At the JOIN step, keep all left-table rows; unmatched right-side values are NULL. Group rows with the same ID(customers.id) → Name(customers.name).