SELECT ptMeds.Station, ptMeds.TxDate, ptMeds.PaType, ptMeds.GenMedName,
ptMeds.Strength, ptMeds.UnitsM, ptMeds.Volume, ptMeds.Dosage
FROM ptMeds
WHERE (((ptMeds.Station)="EMER1开发者_StackOverflow社区") AND ((ptMeds.PaType)="WITHDRAWN")) <I will need to look at the GenMedName field here also>
GROUP BY ptMeds.GenMedName;
I need to be able to SUM based on ptMeds.GenMedName and then sort the results highest to lowest. I've looked thru other responses to similar question but cannot find exactly what I need to do. Any help would be greatly appreciated.
SELECT ptMeds.Station, ptMeds.TxDate, ptMeds.PaType, ptMeds.GenMedName,
ptMeds.Strength, ptMeds.UnitsM, ptMeds.Volume, ptMeds.Dosage
FROM ptMeds
WHERE (((ptMeds.Station)="EMER1") AND ((ptMeds.PaType)="WITHDRAWN"))
GROUP BY ptMeds.GenMedName
ORDER BY ptMeds.GenMedName DESC;
精彩评论