-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday-04.sql
More file actions
22 lines (19 loc) · 748 Bytes
/
day-04.sql
File metadata and controls
22 lines (19 loc) · 748 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
-- SQL Advent Calendar - Day 4
-- Title: Energy-Efficient Holiday Decorations
-- Difficulty: easy
--
-- Question:
-- Kevin's trying to decorate the house without sending the electricity bill through the roof. Write a query to find the top 5 most energy-efficient decorations (i.e. lowest cost per hour to operate).
--
-- Kevin's trying to decorate the house without sending the electricity bill through the roof. Write a query to find the top 5 most energy-efficient decorations (i.e. lowest cost per hour to operate).
--
-- Table Schema:
-- Table: hall_decorations
-- decoration_id: INT
-- decoration_name: VARCHAR
-- energy_cost_per_hour: DECIMAL
--
-- My Solution:
select * from hall_decorations
order by energy_cost_per_hour
limit 5;