결과를 표로 확인하기
products.category → categories.category_name| name | category |
|---|
| category_name | shipping_fee |
|---|
연결된 레코드 없음 → NULL · NULL
연결되는 행 없음 → NULL
SQL을 실행한 뒤 정답을 확인해 보세요.
원본 데이터 · products · 4행
가격 변경은 이 브라우저의 조회에만 적용됩니다. Supabase 원본 데이터는 그대로 유지됩니다.
Complete a sales report · WITH
Intermediate result · WITH · totals From Orders(orders), show Customer ID(orders.customer_id) → sum ((Quantity(order_items.quantity) * Unit price at order (KRW)(order_items.unit_price))) [result column name: total] in this order. Connect the data using INNER JOIN · Order items(order_items). Match rows when ID(orders.id) = Order ID(order_items.order_id). Keep only rows where Order status(orders.status) = 'Paid'. Group rows with the same Customer ID(orders.customer_id). Final query From Customers(customers), show Name(customers.name) → totals.total in this order. Connect the data using INNER JOIN · totals. Match rows when ID(customers.id) = totals.customer_id. Finally, sort by totals.total · descending (largest first) → ID(customers.id) · ascending (smallest first).