View Single Post
Old 2005-01-22, 12:03 PM   #2
cd34
a.k.a. Sparky
 
cd34's Avatar
 
Join Date: Sep 2004
Location: West Palm Beach, FL, USA
Posts: 2,396
Average and max

Code:
mysql> select avg(cp_pr_history.google_pr) from cp_domains,cp_pr_history where client_id=1 and cp_domains.domain_id=cp_pr_history.domain_id group by cp_domains.client_id;
+------------------------------+
| avg(cp_pr_history.google_pr) |
+------------------------------+
|                       2.8602 |
+------------------------------+

mysql> select max(cp_pr_history.google_pr) from cp_domains,cp_pr_history where client_id=1 and cp_domains.domain_id=cp_pr_history.domain_id group by cp_domains.client_id;
+------------------------------+
| max(cp_pr_history.google_pr) |
+------------------------------+
|                            7 |
+------------------------------+
__________________
SnapReplay.com a different way to share photos - iPhone & Android
cd34 is offline   Reply With Quote