samedi 25 avril 2015

MySQL: Count then sort by the count total


I know other posts talk about this, but I haven't been able to apply anything to this situation.

This is what I have so far. "SELECT * FROM ccParts, ccChild, ccFamily WHERE parGC ='26' AND parChild = chiId AND chiFamily = famId ORDER BY famName, chiName"

What I need to do is see the total number of ccParts with the same ccFamily in the results. Then, sort by the total.


Aucun commentaire:

Enregistrer un commentaire