TEN BUSY DAYS OF THE MONTH BASED ON THE TRAFFIC

5 pts.
Tags:
Development
RANK
I WANT TO WRITE A SCRIPT FOR THE TEN BUSIEST DAYS OF THE MONTH BASED ON TRAFFIC.HOW DO I GO ABT IT? THE SCRIPT BELOW IS FOR THE TEN BUSIEST SITES IN THE MONTH,CAN YOU HELP WITH THAT? SELECT DATETIME,SITE,TCH_TRAFFIC,RANK FROM ( SELECT TRUNC(DATETIME,'MM')DATETIME ,SITE ,SUM(SDCCH_CALL_DROP) SDCCH_CALL_DROP ,SUM(TCH_DROP) TCH_DROP ,ROUND(SUM(TCH_TRAFF),2)TCH_TRAFFIC ,ROW_NUMBER() OVER(PARTITION BY TRUNC(DATETIME,'MM') ORDER BY ROUND(SUM(TCH_TRAFF),2) DESC NULLS LAST) RANK FROM ZTE_BSS.V_STD_CELLSTATS_DY --,ZTE_BSS.CELLCFG B WHERE DATETIME BETWEEN TRUNC(SYSDATE,'MM')-3 AND TRUNC(SYSDATE,'MM')-2 --GROUP BY TRUNC(DATETIME,'DD'),CELL--DATETIME,CELL GROUP BY TRUNC(DATETIME,'MM'),SITE ) WHERE RANK <=10

Answer Wiki

Thanks. We'll let you know when a new response is added.

Use the same script, change the TRUNC(DATETIME, ‘MM’) to TRUNC(DATETIME, ‘DD’) and remove the SITE column from the SELECT and the GROUP BY.

Don’t forget the TRUNC function within the ROW_NUMBER command.

Discuss This Question:  

 
There was an error processing your information. Please try again later.
Thanks. We'll let you know when a new response is added.
Send me notifications when members answer or reply to this question.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Forgot Password

No problem! Submit your e-mail address below. We'll send you an e-mail containing your password.

Your password has been sent to:

To follow this tag...

There was an error processing your information. Please try again later.

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy

Thanks! We'll email you when relevant content is added and updated.

Following