i have table with following structure,
name (type: TEXT)
price (type: INT)
color (type: TEXT)
vehicletype (type: TEXT) eg. SEDAN/SUV
now i w
SELECT name, price, color, vehicletype FROM carrecords WHERE
-- black sedans up to 10k
(vehicletype = 'SEDAN' AND color = 'black' AND price <= 10000)
-- red or white sedans up to 8k
OR (vehicletype = 'SEDAN' AND color IN('red','white') AND price <= 8000 )
-- black SUV up to 15k
OR (vehicletype = 'SUV' AND color = 'black' AND price <= 15000)
-- non-black SUV up to 14k
OR (vehicletype = 'SUV' AND color != 'black' AND price <= 14000)
-- any other vehicle up to 7k
OR (price <= 7000)
ORDER BY price ASC