SQL: Find Peak Hours
Medium
SQL — Subqueries
SQL
AVG
Subquery
Find hours with above-average transactions.
Constraints
Write standard SQL (MySQL 8.0 compatible).
Examples
Example 1:
Input: hour count
9 50
10 120
11 80
Output:
Example 2:
Input: hour count
9 50
10 120
11 80
Output:
Hints
Subquery with AVG.
Tests:
Runtime:
Memory:
Test
Input:
Expected:
Got:
Click Run Code to test against sample cases, or Submit to test against all cases.
▲ Console