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

Price Band Lookup (Non-Equi Join)

Attach the band label to each product by joining on the price range. Order by product id.

Table schema

Products(id INT PRIMARY KEY, price INT)
Bands(label VARCHAR(10), min_price INT, max_price INT)

Sample data

Products
id | price
1 | 15
2 | 55
3 | 120

Bands
label | min_price | max_price
Low | 0 | 49
Mid | 50 | 99
High | 100 | 999

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.