SQL query for frequency-related results
Hi guys,
I need some assistance please: how do I structure a SQL command to return frequency-related results from a database. For example, if I wanted the query to return the top 5 entries in a table within specified dates. By top 5 (N), I mean the records (values) in a given table that have occurred the most within that table. Perhaps, to help you help me, if user requests for a product were entered into a table, and I wanted to find out the most requested product in the month of May or within the last 6 months, how will the SQL query be please? Thanks.
|