Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Products Never Sold

Easy Subqueries

Return the names of products that do not appear in any sale.

Table schema

Products(id INT PRIMARY KEY, name VARCHAR(50))
Sales(id INT PRIMARY KEY, product_id INT, quantity INT)

Sample data

Products:
id | name
1 | Pen
2 | Book
3 | Bag

Sales:
id | product_id | quantity
1 | 1 | 10
2 | 3 | 2

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.