Sorting by hour in Vertical Bar Chart
-
Hello,
I have a database with id, datetime and status.
I need to do the chart with presenting counted status, divided by hours in defined day. Problem is that in chart I cannot do the sorting by hours like below.
ORDER BY godzine is not working, same results
My SQl is :
SELECT HOUR (datetime) AS godzina, COUNT(*) As total
FROMwinding_h_6m
s
WHERE STATUS LIKE “OFFLINE” AND datetime LIKE CONCAT(LEFT({sel_date},10),”%”)
GROUP BY godzina;SELECT HOUR (datetime) AS godzina, COUNT(*) As total
FROMwinding_h_6m
s
WHERE STATUS LIKE “ONLINE” AND datetime LIKE CONCAT(LEFT({sel_date},10),”%”)
GROUP BY godzina;SELECT HOUR (datetime) AS godzina, COUNT(*) As total
FROMwinding_h_6m
WHERE STATUS LIKE “WORKING” AND datetime LIKE CONCAT(LEFT({sel_date},10),”%”)
GROUP BY godzina ;SELECT HOUR (datetime) AS godzina, COUNT(*) As total
FROMwinding_h_6m
WHERE STATUS LIKE “ERROR” AND datetime LIKE CONCAT(LEFT({sel_date},10),”%”)
GROUP BY godzinaThe page I need help with: [log in to see the link]
- You must be logged in to reply to this topic.