-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday-08.sql
More file actions
25 lines (22 loc) · 835 Bytes
/
day-08.sql
File metadata and controls
25 lines (22 loc) · 835 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
-- SQL Advent Calendar - Day 8
-- Title: Storage Room Inventory
-- Difficulty: medium
--
-- Question:
-- Mrs. Claus is organizing the holiday storage room and wants a single list of all decorations — both Christmas trees and light sets. Write a query that combines both tables and includes each item's name and category.
--
-- Mrs. Claus is organizing the holiday storage room and wants a single list of all decorations — both Christmas trees and light sets. Write a query that combines both tables and includes each item's name and category.
--
-- Table Schema:
-- Table: storage_trees
-- item_name: VARCHAR
-- category: VARCHAR
--
-- Table: storage_lights
-- item_name: VARCHAR
-- category: VARCHAR
--
-- My Solution:
select item_name, category from storage_trees
UNION
select item_name, category from storage_lights