prev work

This commit is contained in:
2025-12-25 22:29:59 +01:00
parent bced226cbd
commit d09a875488
6 changed files with 69 additions and 2 deletions

View File

@@ -52,3 +52,7 @@ SELECT permissions.`view` FROM permissions LEFT JOIN rooms ON permissions.`roomI
# get latest reading from a sensor
SELECT readings.`Timestamp`, readings.`reading` FROM readings WHERE readings.`sensorID` = '1' ORDER BY readings.`Timestamp` DESC FETCH FIRST 1 ROWS ONLY;
Select sensors.`ID`, sensors.`Type` FROM sensors LEFT JOIN devices ON devices.`ID` = sensors.`deviceID` LEFT JOIN rooms ON devices.`roomID` = rooms.`ID` WHERE rooms.shortname = "101";
SELECT users.`ID`, users.`username`, users.`administer` FROM Users;