Skip to content

Commit dbf9bbe

Browse files
committed
Upload 192
1 parent 37df5d5 commit dbf9bbe

File tree

2 files changed

+64
-1
lines changed

2 files changed

+64
-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-191-green.svg)](#index)
3+
[![Solved](https://img.shields.io/badge/solved-192-green.svg)](#index)
44
<!-- markdownlint-enable MD041 -->
55

66
# SQL Everyday
@@ -225,6 +225,7 @@ Because this project necessitated a framework to enable consistent daily practic
225225
| 189 | [Unique Orders and Customers Per Month](https://leetcode.com/problems/unique-orders-and-customers-per-month/description/) | [Solution](solutions/189_unique_orders_and_customers_per_month.md) | LeetCode | Easy | |
226226
| 190 | [Warehouse Manager](https://leetcode.com/problems/warehouse-manager/description/) | [Solution](solutions/190_warehouse_manager.md) | LeetCode | Easy | |
227227
| 191 | [The Number of Rich Customers](https://leetcode.com/problems/the-number-of-rich-customers/description/) | [Solution](solutions/191_the_number_of_rich_customers.md) | LeetCode | Easy | |
228+
| 192 | [Find Candidates for Data Scientist Position](https://leetcode.com/problems/find-candidates-for-data-scientist-position/description/) | [Solution](solutions/192_find_candidates_for_data_scientist_position.md) | LeetCode | Easy | |
228229
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
229230
<!--- cSpell:enable --->
230231

Lines changed: 62 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
# SQL Everyday \#192
2+
3+
## Find Candidates for Data Scientist Position
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a query to find the **candidates** best suited for a Data Scientist position. The candidate must be proficient in **Python**, **Tableau**, and **PostgreSQL**.
11+
12+
Return the result table ordered by *candidate_id* in **ascending order**. [[Full Description](https://leetcode.com/problems/find-candidates-for-data-scientist-position/description/)]
13+
14+
## Submitted Solution
15+
16+
```sql
17+
-- Submitted Solution
18+
WITH cte AS (
19+
SELECT
20+
candidate_id
21+
,STRING_AGG(LOWER(skill), ',') AS skills
22+
FROM Candidates
23+
GROUP BY candidate_id
24+
)
25+
SELECT
26+
candidate_id
27+
FROM cte
28+
WHERE skills LIKE '%python%'
29+
AND skills LIKE '%tableau%'
30+
AND skills LIKE '%postgresql%'
31+
ORDER BY candidate_id ASC
32+
;
33+
```
34+
35+
## Site Solution
36+
37+
```sql
38+
-- LeetCode Solution
39+
-- No site solution provided
40+
41+
-- Code Author: Shubham Tiwari
42+
-- https://leetcode.com/problems/find-candidates-for-data-scientist-position/solutions/4785812/easy-solution
43+
SELECT
44+
candidate_id
45+
FROM candidates
46+
WHERE skill IN ('Python','Tableau','PostgreSQL')
47+
GROUP BY 1
48+
HAVING COUNT(skill) = 3
49+
ORDER BY 1 ASC
50+
;
51+
```
52+
53+
## Notes
54+
55+
TBD
56+
57+
## NB
58+
59+
TBD
60+
61+
Go to [Index](../?tab=readme-ov-file#index)\
62+
Go to [Overview](../?tab=readme-ov-file)

0 commit comments

Comments
 (0)