If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > How to Average Data Counts?

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 04-09-08, 17:22
awohld awohld is offline
Registered User
 
Join Date: Jan 2004
Posts: 11
How to Average Data Counts?

I have a data set that looks like this:

From_Network, From_Node, To_Node, To_Network, Count
4,304,2,350,14000
4,304,2,650,4001
4,304,5,150,3005
4,304,2,250,240
4,304,2,250,50
4,310,2,350,16000
4,310,2,650,12000
4,310,5,150,1000
4,310,2,250,100

How can I get the average number of "Count"s for each of 1st highest count until and N+ highest. I.E. the for the first hightest count the average would be (14000/16000)/2 = 15000

So my dataset when I query would look like:

15000
8000.5
2002.5
170
25

I have no idea on how to start this. How would this work?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On