Hey All-
Thanks to Liquorvicor I was able to solve one of my other query questions so I have one more that I'm beating my head over.
I'm using the following query:
mysql> select distinct report_date, 45 Day ATS,count(45 Day ATS) as numrows from ohsnap where report_date like '%1/1/2007%' and 45 Day ATS > 4 group by report_date order by numrows DESC;
+-------------+------------+---------+
| report_date | 45 Day ATS | numrows |
+-------------+------------+---------+
| 40 | 221 |
+-------------+------------+---------+
1 row in set (0.00 sec)
Its returning the correct count for 45 Day ATS but the report date is being returned improperly due to how I've constructed the query.
What I need to do is the following:
Select distinct dates from the report_date field and then do a count on 45 Day ATS for each date and return the result set.
Can anyone clue me into how I'm constructing this one wrong?
Thanks!
Drew-