Question : Top 5 query in SQL 7.0


ok, in the SQL 7.0 query window I have....

Select code_table, entry_date
From doc_diagnosis
Where (entry_date Between '1/1/2004' And '12/31/2004')
Order by code_table

.....far as I can tell I am properly getting a list/table in the lower portion of the screen that shows all "codes" used in 2004, BUT now I want the "top 5" codes by quantity used.  I've tried using the Top5 I used in a separate SQL statement in Crystal but no luck.

Please show me how to integrate this Top5 request into this query and then tell me how to save this query.  Cannnot find option on screen.

Thanks

Answer : Top 5 query in SQL 7.0

Select TOP 5 code_table, entry_date
From doc_diagnosis
Where (entry_date Between '1/1/2004' And '12/31/2004')
Order by quantity DESC
Random Solutions  
 
programming4us programming4us