SELECT COUNT(*), car_id FROM tb1
WHERE value IN(1000,3000)
GROUP BY car_id
this query return number of cars that have value of 1000 or 3000$, is there any way to multiply on 2, cars with 3000$ value ?
for example if there are 3 of 1000$ car & 2 of 3000$ car, it return: 7.
i know i can use SUM with a little trick, but i wonder if there is any way to do it with count.