Products Not Ordered in 2026
Medium
Anti & Semi Joins
Return the names of products that have no order dated in 2026 (products that were never ordered also qualify). Order by name.
Table schema
Products(id INT PRIMARY KEY, name VARCHAR(50))
Orders(id INT PRIMARY KEY, product_id INT, order_date DATE)Sample data
Products: (1, Pen), (2, Book), (3, Bag)
Orders: (1, 1, 2026-02-01), (2, 2, 2025-12-01), (3, 3, 2025-05-01), (4, 3, 2026-03-01)
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.