Sobes.tech
Junior — Senior

Display all clients along with their orders, including those without orders

livecode

Task condition

There are two tables in the database: customers and orders. It is necessary to output a list of all customers and match each with their orders. Customers without orders should also be included in the result.

CREATE TABLE customers (
    id INT PRIMARY KEY,
    name VARCHAR(100),
    created_at DATE,
    updated_at DATE
);
CREATE TABLE orders (
    id INT PRIMARY KEY,
    created_at DATE,
    customer_id INT REFERENCES customers(id)
);