How to get top 50 URLs for a particular date.i,e getting the distinct count of URLs,then getting the maximum of that and next 49 URLs depending on count.It should be in descending order

Showing Answers 1 - 1 of 1 Answers

rajamuna

  • Apr 4th, 2006
 

SELECT *,ROWNUM r FROM (SELECT COUNT(url_name) hit,url_name FROM URL_DETAILS_TBL WHERE url_name IN
(SELECT DISTINCT url_name FROM URL_DETAILS_TBL WHERE TO_DATE(ENTRY_DATE,'MM/DD/YYYY') = '12/13/2005')
AND TO_DATE(ENTRY_DATE,'MM/DD/YYYY') = '12/13/2005'   ORDER BY hit DESC) WHERE AND r < 51

ASSUMPTIONS :

Table Name is : URL_DETAILS_TBL

Columns are : url_name,ENTRY_DATE

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions