SQL - LEFT and RIGHT JOIN
You have tables:
customers(id, name), orders(id, customer_id, date), payments(id, order_id, amount)
Write a query to list all customers with their latest order date and total payment amount, including customers with no orders or payments.
customers(id, name), orders(id, customer_id, date), payments(id, order_id, amount)
Write a query to list all customers with their latest order date and total payment amount, including customers with no orders or payments.
