← 返回 akunacapital 的题目列表Cloud Computing Resource Utilization Dashboard (SQL)
类型:online_judge
Problem: Cloud Computing Resource Utilization Dashboard (SQL)
Two tables store resource usage metrics per application:
cpu_metrics(application_id INT, dt VARCHAR(19), usage_percentage DECIMAL(5,2))
memory_metrics(application_id INT, dt VARCHAR(19), usage_percentage DECIMAL(5,2))
Write a SQL query to produce a unified report with columns:
resource_type: string 'CPU' or 'Memory'
application_id
average_usage_percentage: average usage for that resource within the target month, rounded to 2 decimals and displayed with 2 decimals (e.g., 35.00)
Filters
Only include records from February 2024 (>= '2024-02-01' and < '2024-03-01').
Only include applications whose average usage > 50% for that specific resource type.
Sorting
Order by application_id ascending, then resource_type ascending.