How can you write the following in MYSQL?
SELECT AVG(col1) FROM table WHERE DISTINCT col2
more info:
table
col1 | col2
-----------
2 | 555.555.555.555
5 | 555.555.555.555
4 | 444.444.444.444
returns '3'
Basically I'm trying to select average value of col1 where ip addresses in col2 are distinct.