playground explore freely · no grades
SQL Playground
Explore any Runtime dataset with SQL. Nothing here affects course progress.
Two months of telemetry from sensors across eight fictional facilities: cold rooms, freezers, production lines, offices and pump stations, with alerts, outages and maintenance.
152,544 rows7 tables2025-03 – 2025-04
tables
Open a table to see what one row means, its columns and keys, and a preview. Start from sensor_readings: it is the dataset's central table.
locations41 rows · 5 columns
One monitored zone inside a site.
- location_id
Location key
- site_name
Facility
- zone_name
Room or area within the site
- city
City
- timezone
IANA time zone of the site
sensor_types10 rows · 7 columns
One kind of measurement (for example temperature), including valid ranges and alert thresholds.
- sensor_type_id
Sensor type key
- type_name
Measurement
- unit
Unit of measure
- valid_min
Lowest physically plausible value
- valid_max
Highest physically plausible value
- alert_low
Alert when the value falls below this; NULL if no low threshold
- alert_high
Alert when the value rises above this; NULL if no high threshold
devices186 rows · 9 columns
One installed sensor device.
- device_id
Device key
- serial_number
Manufacturer serial
- sensor_type_id
What it measures
- location_id
Where it is installed
- model
Hardware model
- firmware_version
Firmware at the end of the period
- reporting_interval_minutes
Expected minutes between readings
- installed_at
Installation time (UTC)
- retired_at
Removal time; NULL while in service
sensor_readings150,425 rows · 10 columns
One sensor reading. The same reading can arrive more than once when a device retransmits.
- reading_id
Ingestion key
- device_id
Device
- sequence_number
Device message counter
- recorded_at
Measurement time on the device clock (UTC)
- received_at
Platform ingestion time (UTC); late when the device buffered offline
- value
Measured value in the type’s unit; NULL when the sensor reported a fault
- battery_pct
Battery level for battery-powered devices; NULL for mains-powered
- gateway_id
Wireless gateway that relayed the reading; NULL for wired (mains-powered) devices
- signal_rssi_dbm
Received signal strength at the gateway, dBm (closer to 0 is stronger); NULL for wired devices
- quality_flag
Platform check on arrival: ok, out_of_range (outside the sensor type’s valid range) or fault (no value)
alerts483 rows · 7 columns
One alert period when a device went out of range or lost connectivity.
- alert_id
Alert key
- device_id
Device
- alert_type
high_threshold, low_threshold, offline or low_battery
- severity
warning or critical
- opened_at
First reading or check that triggered the alert
- closed_at
When the condition cleared; NULL if still open
- peak_value
Most extreme value while open; NULL for connectivity alerts
maintenance168 rows · 7 columns
One maintenance visit for a device. Two technicians can log overlapping orders for the same visit.
- maintenance_id
Work order key
- device_id
Device serviced
- maintenance_type
calibration, battery_replacement, repair, firmware_update or replacement
- technician
Technician name
- started_at
Work start (UTC)
- completed_at
Work end; NULL if still open
- cost
Cost in USD
device_status_events1,231 rows · 5 columns
One change in a device’s status. That status lasts until the next status event.
- status_event_id
Event key
- device_id
Device
- changed_at
When the new state began (UTC)
- status
online, offline, degraded, maintenance or retired
- reason
Why the state changed
relationships
How to join these tables. Left column matches the right column.
- devices.sensor_type_id joins to sensor_types.sensor_type_id
- devices.location_id joins to locations.location_id
- sensor_readings.device_id joins to devices.device_id
- alerts.device_id joins to devices.device_id
- maintenance.device_id joins to devices.device_id
- device_status_events.device_id joins to devices.device_id