Skip to content

Commit c6f24fd

Browse files
committed
Upload 179
1 parent 1bb2995 commit c6f24fd

File tree

2 files changed

+58
-1
lines changed

2 files changed

+58
-1
lines changed

README.md

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<!-- markdownlint-disable MD041 -->
22
[![eevveerryyddaayy release](https://img.shields.io/badge/eevveerryyddaayy-v1.3.0-blue.svg)](https://github.com/ggeerraarrdd/eevveerryyddaayy/)
3-
[![Solved](https://img.shields.io/badge/solved-178-green.svg)](#index)
3+
[![Solved](https://img.shields.io/badge/solved-179-green.svg)](#index)
44
<!-- markdownlint-enable MD041 -->
55

66
# SQL Everyday
@@ -212,6 +212,7 @@ Because this project necessitated a framework to enable consistent daily practic
212212
| 176 | [Concatenate the Name and the Profession](https://leetcode.com/problems/concatenate-the-name-and-the-profession/description/) | [Solution](solutions/176_concatenate_the_name_and_the_profession.md) | LeetCode | Easy | `SUBSTRING` vs `LEFT` |
213213
| 177 | [Consecutive Available Seats](https://leetcode.com/problems/consecutive-available-seats/description/) | [Solution](solutions/177_consecutive_available_seats.md) | LeetCode | Easy | |
214214
| 178 | [Shortest Distance in a Line](https://leetcode.com/problems/shortest-distance-in-a-line/description/) | [Solution](solutions/178_shortest_distance_in_a_line.md) | LeetCode | Easy | `SELF-JOIN` vs `CROSS JOIN` |
215+
| 179 | [Friendly Movies Streamed Last Month](https://leetcode.com/problems/friendly-movies-streamed-last-month/description/) | [Solution](solutions/179_friendly_movies_streamed_last_month.md) | LeetCode | Easy | |
215216
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
216217
<!--- cSpell:enable --->
217218

Lines changed: 56 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,56 @@
1+
# SQL Everyday \#179
2+
3+
## Friendly Movies Streamed Last Month
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to report the distinct titles of the kid-friendly movies streamed in **June 2020**.
11+
12+
Return the result table in **any order**. [[Full Description](https://leetcode.com/problems/friendly-movies-streamed-last-month/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
SELECT
19+
DISTINCT c.title
20+
FROM TVProgram AS t
21+
JOIN Content AS c ON t.content_id = c.content_id
22+
WHERE c.Kids_content = 'Y'
23+
AND c.content_type = 'Movies'
24+
AND DATE_FORMAT(t.program_date,'%Y-%m') = '2020-06'
25+
;
26+
```
27+
28+
## Site Solution
29+
30+
```sql
31+
-- LeetCode Solution
32+
SELECT
33+
DISTINCT c.title
34+
FROM
35+
Content c
36+
JOIN
37+
TVProgram p
38+
ON
39+
c.content_id = p.content_id
40+
WHERE
41+
c.Kids_content = 'Y'
42+
AND
43+
c.content_type = 'Movies'
44+
AND MONTH(p.program_date) = 6 AND YEAR(p.program_date) = 2020
45+
```
46+
47+
## Notes
48+
49+
TBD
50+
51+
## NB
52+
53+
TBD
54+
55+
Go to [Index](../?tab=readme-ov-file#index)\
56+
Go to [Overview](../?tab=readme-ov-file)

0 commit comments

Comments
 (0)