Hi everyone,
Currently I've got a SQL query which returns distinct row:
$sql_method = "SELECT DISTINCT method_info AS 'method' FROM marketing WHERE method='$m'";
What I need to have is this query return the number of each distinct value return.
For instance:
method_info
www.google.com
www.google.com
www.yahoo.com
This SQL query currently returns:
method
www.google.com
www.yahoo.com
and i need it to return
method number
www.google.com 2
www.yahoo.com 1
I've tried various variations on COUNT(method_info) and COUNT(DISTINCT method_info), and got absolutely nowhere.
Can anybody help me out here?
Thanks,
Kerin