SQL Selecting Distinct Count of items where 2 conditions are met?

Have you tried following query Edit SELECT product_brandNAME , product_classNAME , COUNT(*) FROM products JOIN product_brand ON products. Product_brandID = product_brand. Product_brandID JOIN product_class ON products.

Product_classID = product_class. Product_classID GROUP BY product_brandNAME , product_classNAME.

Thanks Lieven, that was close to right, but put me on the right track, I just took out the |GROUP BY 'productID'|, and its a winner, thanks so much, saved me tons of time :) – wingman Dec 6 '10 at 10:11.

When using GROUP BY you do not need to use a DISTINCT clause. Try the following: SELECT productID, product_brandNAME, product_classNAME, COUNT(*) as COUNT FROM products JOIN product_brand ON products. Product_brandID = product_brand.

Product_brandID JOIN product_class ON products. Product_classID = product_class. Product_classID GROUP BY productID, product_brandNAME, product_classNAME ORDER BY product_brandNAME.

I cant really gove you an answer,but what I can give you is a way to a solution, that is you have to find the anglde that you relate to or peaks your interest. A good paper is one that people get drawn into because it reaches them ln some way.As for me WW11 to me, I think of the holocaust and the effect it had on the survivors, their families and those who stood by and did nothing until it was too late.

Related Questions