How do you compare counts in a query?

WHERE (SELECT COUNT(*) FROM products p WHERE p.productSetId = ps.id) =
(SELECT COUNT(*) FROM products p
INNER JOIN listingVariants lv ON p.id = lv.productId
WHERE p.productSetId = ps.id);
WHERE (SELECT COUNT(*) FROM products p WHERE p.productSetId = ps.id) =
(SELECT COUNT(*) FROM products p
INNER JOIN listingVariants lv ON p.id = lv.productId
WHERE p.productSetId = ps.id);
how would you do this in drizzle without just using the sql operator
0 Replies
No replies yetBe the first to reply to this messageJoin
Want results from more Discord servers?
Add your server