Adding a WHERE clause on a GROUP BY operation – Woocommerce
This query lists out the distinct order numbers in Woocommerce that have order either of two products, where the orders are in a status called 'wc-on-hold'. The query does work, but if I comment back in the AND COUNT(t1.ID)=2 it…