This website is for reference purposes only. Users are responsible for any misuse. The owner is not liable for any consequences.

Question

Solution

SQL

CREATE VIEW invoices AS
SELECT
	o.order_id,
	c.name AS customer_name,
	c.email AS customer_email,
	c.phone AS customer_phone,
	s.name AS shipper_name,
	s.contact AS shipper_contact,
	o.order_date,
	o.total_amount
FROM 
	orders o
JOIN
	customers c ON o.customer_id = c.customer_id
JOIN
	shippers s ON o.shipper_id = s.shipper_id;

2/2 test cases passed

No hidden test cases