SQL: Filter category X #22
Ready — edit the code above and click Run.
-- Sample tables
CREATE TABLE Items (Id INT, Name TEXT, Price INT, Category TEXT);
INSERT INTO Items VALUES (1,'A',100,'X'),(2,'B',200,'X'),(3,'C',150,'Y');
SELECT * FROM Items WHERE Category = 'X' AND Price >= 310;
Try solving on your own first, then reveal the official answer.
SQL interview practice.