How to group by time

For this URL:

http://ec2-52-40-164-217.us-west-2.compute.amazonaws.com:3000/api/datasources/proxy/1/query?db=telegraf&q=SELECT near_failure as “Disk Health Status”, disk_serial_number AS “Serial Number” FROM autogen.sai_disk_prediction WHERE near_failure=’>45 Days’ and time<now() GROUP BY disk_serial_number

I want to GROUP BY disk_serial_number, and “time” group by one day, like this “GROUP BY (disk_serial_number, time(1d))”, but it take me an error, how to fix it, make it looks like bellow:

[
“2017-09-14”,
">45 Days",
“BTHV639106GG800OGN”
],
[
“2017-09-15”,
">45 Days",
“BTHV639106GG800OGN”
],
[
“2017-09-16”,
">45 Days",
“BTHV639106GG800OGN”
]

Thank you for your help

Can you show a screenshot of your query. This is a working InfluxDB query that groups by 1 hour:

image

and the raw query:

SELECT mean("value") FROM "logins.count" 
WHERE ("datacenter" =~ /^$datacenter$/ AND "hostname" =~ /^$host$/) AND $timeFilter
GROUP BY time(1h), "hostname"