give me a query or a script with a query that will help me display the status of an…
Jump to turn (7)
- 1give me a query or a script with a query that will help me display the status of
- 2add eventvalue to participate in the group by clause
- 3calculate the status and percentage per day
- 4redo this clause but for 24 hours. GROUP BY FLOOR(eventtimestamp / (60 60)), eve
- 5eventtimestamp is not a date or an hour
- 6now I want you to only show the percenatage total for all the dates
- 7The percenatge should be a count of how many times it is on and how many time it
- User
give me a query or a script with a query that will help me display the status of an industrial furnace. It should show if its on or off and and the percentage of time is on or off. the boolean value for on or off is in a column named event_value. The timestamp values is in the column event_timestamp.
- Assistant
You can use a SQL query to display the status of an industrial furnace, showing whether it is on or off and the percentage of time it is on or off. Assuming you are using a MySQL database, the following query should help: