-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday-13.sql
More file actions
21 lines (18 loc) · 721 Bytes
/
day-13.sql
File metadata and controls
21 lines (18 loc) · 721 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
-- SQL Advent Calendar - Day 13
-- Title: Naughty or Nice Score Extremes
-- Difficulty: easy
--
-- Question:
-- Santa's audit team is reviewing this year's behavior scores to find the extremes — write a query to return the lowest and highest scores recorded on the Naughty or Nice list.
--
-- Santa's audit team is reviewing this year's behavior scores to find the extremes — write a query to return the lowest and highest scores recorded on the Naughty or Nice list.
--
-- Table Schema:
-- Table: behavior_scores
-- record_id: INTEGER
-- child_name: VARCHAR
-- behavior_score: INTEGER
--
-- My Solution:
select max(behavior_score) as maximum_score, min(behavior_score) as minimal_score
from behavior_scores