`scan_date` datetime DEFAULT NULL,
And I just know that we can grab date only partial by using date in sql statement. Try this:
SELECT avg(wqi), date(scan_date) dateOnly FROM `riverdata` group by dateOnly
:P
`scan_date` datetime DEFAULT NULL,
SELECT avg(wqi), date(scan_date) dateOnly FROM `riverdata` group by dateOnly