0
0
SCADA systemsdevops~10 mins

Querying historical data in SCADA systems - Interactive Code Practice

Choose your learning style9 modes available
Practice - 5 Tasks
Answer the questions below
1fill in blank
easy

Complete the code to select all records from the historical data table.

SCADA systems
SELECT * FROM [1];
Drag options to blanks, or click blank then click option'
Acurrent_data
Bhistorical_data
Clive_data
Dsensor_data
Attempts:
3 left
💡 Hint
Common Mistakes
Using the live or current data table instead of historical data.
Misspelling the table name.
2fill in blank
medium

Complete the code to filter historical data for sensor ID 101.

SCADA systems
SELECT * FROM historical_data WHERE sensor_id = [1];
Drag options to blanks, or click blank then click option'
A101
B'101'
Csensor_101
Did_101
Attempts:
3 left
💡 Hint
Common Mistakes
Putting the sensor ID in quotes causing type mismatch.
Using incorrect sensor ID formats.
3fill in blank
hard

Fix the error in the query to get data between two dates.

SCADA systems
SELECT * FROM historical_data WHERE timestamp [1] '2024-01-01' AND timestamp [2] '2024-01-31';
Drag options to blanks, or click blank then click option'
A>=
B<=
C==
D!=
Attempts:
3 left
💡 Hint
Common Mistakes
Using equality instead of range operators.
Mixing up greater than and less than signs.
4fill in blank
hard

Fill both blanks to query average temperature for sensor 202 in February 2024.

SCADA systems
SELECT AVG([1]) FROM historical_data WHERE sensor_id = 202 AND timestamp [2] '2024-02-01' AND timestamp <= '2024-02-28';
Drag options to blanks, or click blank then click option'
Atemperature
Bhumidity
C>=
D<
Attempts:
3 left
💡 Hint
Common Mistakes
Using the wrong data column like humidity.
Using incorrect date comparison operators.
5fill in blank
hard

Fill all three blanks to get max pressure for sensor 303 between March 1 and March 15, 2024.

SCADA systems
SELECT MAX([1]) FROM historical_data WHERE sensor_id = [2] AND timestamp >= '[3]' AND timestamp <= '2024-03-15';
Drag options to blanks, or click blank then click option'
Apressure
B303
C2024-03-01
Dtemperature
Attempts:
3 left
💡 Hint
Common Mistakes
Using wrong column names like temperature instead of pressure.
Using sensor ID as a string instead of number.
Incorrect date format or wrong start date.