-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathday-11.sql
More file actions
21 lines (18 loc) · 908 Bytes
/
day-11.sql
File metadata and controls
21 lines (18 loc) · 908 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 11
-- Title: Winter Market Sweater Search
-- Difficulty: medium
--
-- Question:
-- At the winter market, Cindy Lou is browsing the clothing inventory and wants to find all items with "sweater" in their name. But the challenge is the color and item columns have inconsistent capitalization. Can you write a query to return only the sweater names and their cleaned-up colors.
--
-- At the winter market, Cindy Lou is browsing the clothing inventory and wants to find all items with "sweater" in their name. But the challenge is the color and item columns have inconsistent capitalization. Can you write a query to return only the sweater names and their cleaned-up colors.
--
-- Table Schema:
-- Table: winter_clothing
-- item_id: INT
-- item_name: VARCHAR
-- color: VARCHAR
--
-- My Solution:
select color, item_name from winter_clothing
where item_name ilike '%sweater'