SELECT shop_product.id, shop_product_skus.count FROM shop_product, shop_product_skus
WHERE shop_product.id=shop_product_skus.product_id AND shop_product_skus.count >= 3
AND shop_product.id IN (14770, 13287, 14160, 13906)
SELECT shop_product.id, if(shop_product_skus.count >= 3, shop_product_skus.count, 0) as count
FROM shop_product
join shop_product_skus on shop_product.id = shop_product_skus.product_id
WHERE
shop_product.id IN (14770, 13287, 14160, 13906)
Можно ли средствами SQL задать значение в выводе 0 всем остальным записям, которые < 3?