Averages

From: Date: Wed, 13 Dec 2000 16:33:33 +0000
Subject: Averages
Groups: php.general 
Request: Send a blank email to php-general+get-30102@lists.php.net to get a copy of this message
I have a number field counting downloads and a date field. I would like to create a query showing most downloaded files using the average downloads a day via the date and count fields. Example. File 1 added 2000-12-11 15:27:22 total downloads = 98 average = 49/day File 2 added 2000-12-02 15:27:22 total downloads = 25 average = 2/day File 3 added 2000-12-13 15:27:22 total downloads = 158 average = 158/day Now I would like to use this info and create a query showing this info placing the most downloads a day on top. In this case: File 3, File 1, file 3. Any ideas to creating the statement? $query = "select * from warbirds_db WHERE FileCount Average of FileDate ORDER BY FileCount DESC LIMIT 0, 25";

« previous php.general (#30102) next »