I have a query that returns a sum of tests. This query returns all tests. I only need to return the top 10 tests in quantity. How can I do this?
Thanks in advance - Shannan
SELECT DISTINCT Procedures_T.P_num, Procedures_T.P_desc, SUM(Pat_ProcedureCharges_T.Proc_qty) AS TOTAL
FROM Procedures_T LEFT JOIN Pat_ProcedureCharges_T ON Procedures_T.Entry_id = Pat_ProcedureCharges_T.Proc_id
GROUP BY P_num, P_Desc
Thanks in advance - Shannan
SELECT DISTINCT Procedures_T.P_num, Procedures_T.P_desc, SUM(Pat_ProcedureCharges_T.Proc_qty) AS TOTAL
FROM Procedures_T LEFT JOIN Pat_ProcedureCharges_T ON Procedures_T.Entry_id = Pat_ProcedureCharges_T.Proc_id
GROUP BY P_num, P_Desc