SQL Quest › SQL Interview Questions › Aggregation & Grouping
Average Sensor Readings
Compute baseline averages across all operational data: avg_air_temp, avg_process_temp, avg_rpm, avg_torque (each rounded to 2 decimals). Returns one row.
Solve it in the browser editor →
Runs on SQLite in your browser, graded against the expected result, no signup. A wrong answer gets a diagnosis, not just "incorrect".
Schema
operational_data
| udi | air_temp_k | process_temp_k | rotational_speed_rpm | torque_nm |
|---|---|---|---|---|
| 5640 | 302.6 | 312.1 | 1668 | 28.7 |
| 2171 | 299.4 | 309.1 | 1500 | 43.3 |
| 228 | 298.3 | 308.5 | 1539 | 36.1 |
Expected output: Single-row baseline
Hint
AVG(...) for each column. ROUND to 2 decimals.
Concepts
SELECT Aggregation AVG
Practise the topic: SQL practice questions · GROUP BY exercises
Related questions
Counting RowsEasy · FreeSUM, AVG, MIN, MAXEasy · FreeGROUP BY BasicsEasy · FreeMonthly Order CountEasy · FreeHow Many Genres Do We Cover? (DISTINCT)Easy · FreeFemale Survivor CountEasy · Free
Where would this cost you points in an interview?
Ten questions, no signup: a Skillmap across nine SQL skills and the one to fix first.
Take the readiness test