RienSQL
TASK #200 · Medium

Customers with no purchases disappeared from the report

Your brief
The report must show every customer and their order total, including those who have not bought anything yet: those should show 0.

Customers with no orders never made it into the report.

Output name (customer name) and total_amount (their order total).
Expected columnsname total_amountCompany
SQL editor
SQLite
Ctrl / ⌘ + ↵
Result

Write a query and run it to see the results.

Schema
departmentsid, name
employeesid, name, department_id, manager_id, salary, hired_at
customersid, name, registered_at
ordersid, customer_id, employee_id, amount, created_at
loginsuser_id, logged_at