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);

how would you do this in drizzle without just using the sql operator
Was this page helpful?