Company: DTCC
Difficulty: medium
List Customers and Products Without a Sale Using the `UNION` operator, return a single list containing every customer who has no invoice and every product that was never sold. For each customer with no matching `invoice.customer_id`, return the literal `customer`, the customer id, and the customer name. For each product with no matching `invoice.product_id`, return the literal `product`, the product id, and the product name. Return exactly three columns, in this order and with these names: `item_type`, `id`, `name`. Order the rows by `item_type`, then by `id`. Schema `customer(id INT PRIMARY KEY, customer_name VARCHAR(255), city_id INT, customer_address VARCHAR(255), contact_person VARCHAR(255), email VARCHAR(128), phone VARCHAR(128))` `product(id INT PRIMARY KEY, product_name VARCHAR(255))` `invoice(id INT PRIMARY KEY, customer_id INT, product_id INT)` Example For the seed data customer: (1, 'Asha'), (2, 'Bala') product: (10, 'Pen'), (11, 'Book') invoice: (100, 1, 10) the expected res