I have this query:
SELECT device, COUNT(*) FROM database.table group by device having count(*) > 1 order by device;
What I need to do is add a column that shows the last time the device connected to the database.
The table is structured like:
ID, device(string), data1(int),data2(int), time(timestamp), data3(int),data4(int)