I’m struggling with displaying a graph from very simple mysql table. There are just three fields: id, date and sensorID - which is equal 1 all the time. Every time an event happens there is a record of it.
date field has datetime type. I would love to display on a graph number of events per day.
I have tried:
UNIX_TIMESTAMP(date) as time_sec,
sensorID as value,
sensorID as metric
ORDER BY date ASC
where should I put SUM(
sensorID) and GROUP BY DATE(date)?
Thanks a lot!