Skip to content

Commit 1fcbd49

Browse files
committed
Upload 154
1 parent d0961cc commit 1fcbd49

File tree

2 files changed

+52
-1
lines changed

2 files changed

+52
-1
lines changed

README.md

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ One SQL problem a day for a year
1010
1111
<!-- markdownlint-enable MD028 -->
1212
> [!NOTE]
13-
> `SQL Everyday` has been templatized into [`eevveerryyddaayy-template`](https://github.com/ggeerraarrdd/eevveerryyddaayy-template/), or simply `eevveerryyddaayy`. For more info, including instructions on installation, configruation and usage, go to [here](https://github.com/ggeerraarrdd/eevveerryyddaayy).
13+
> `SQL Everyday` has been templatized into [`eevveerryyddaayy-template`](https://github.com/ggeerraarrdd/eevveerryyddaayy-template/), or simply `eevveerryyddaayy`. For more info, including instructions on installation, configuration and usage, go to [here](https://github.com/ggeerraarrdd/eevveerryyddaayy).
1414
1515
_SQL Everyday_ is a personal challenge to solve at least one SQL problem everyday for the next 365 days, starting from September 28, 2024.
1616

@@ -30,6 +30,7 @@ The problems and both submitted and site solutions are documented in individual
3030

3131
## Index
3232

33+
<!--- cSpell:disable --->
3334
<!-- Index Start - WARNING: Do not delete or modify this markdown comment. -->
3435
| Day | Title | Solution | Site | Difficulty | NB |
3536
| ----- | ------------------------------------------------------------------------------------------------------------------------------------------------------------- | ------------------------------------------------------------------------------------- | ----------- | ------------ | ------------------------------------------------------------------- |
@@ -186,7 +187,9 @@ The problems and both submitted and site solutions are documented in individual
186187
| 151 | [Capital Gain/Loss](https://leetcode.com/problems/capital-gainloss/description/) | [Solution](solutions/151_capital_gainloss.md) | LeetCode | Medium | |
187188
| 152 | [Daily Leads and Partners](https://leetcode.com/problems/daily-leads-and-partners/description/) | [Solution](solutions/152_daily_leads_and_partners.md) | LeetCode | Easy | |
188189
| 153 | [Find Total Time Spent by Each Employee](https://leetcode.com/problems/find-total-time-spent-by-each-employee/description/) | [Solution](solutions/153_find_total_time_spent_by_each_employee.md) | LeetCode | Easy | |
190+
| 154 | [Find Users With Valid E-Mails](https://leetcode.com/problems/find-users-with-valid-e-mails/description/) | [Solution](solutions/154_find_users_with_valid_e_mails.md) | LeetCode | Easy | Regex |
189191
<!-- Index End - WARNING: Do not delete or modify this markdown comment. -->
192+
<!--- cSpell:enable --->
190193

191194
## Author(s)
192195

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
# SQL Everyday \#154
2+
3+
## Find Users With Valid E-Mails
4+
5+
Site: LeetCode\
6+
Difficulty per Site: Easy
7+
8+
## Problem
9+
10+
Write a solution to find the users who have *valid emails*.
11+
12+
A valid e-mail has a prefix name and a domain where:
13+
14+
* *The prefix name* is a string that may contain letters (upper or lower case), digits, underscore `'_'`, period `'.'`, and/or dash `'-'`. The prefix name *must* start with a letter.
15+
* The domain is `'@leetcode.com'`.
16+
17+
Return the result table in *any order*. [[Full Description](https://leetcode.com/problems/find-users-with-valid-e-mails/description/)]
18+
19+
## Submitted Solution
20+
21+
```sql
22+
-- Submitted Solution
23+
SELECT
24+
user_id
25+
,name
26+
,mail
27+
FROM Users
28+
WHERE mail ~ '^[a-zA-Z][a-zA-Z0-9._-]*@leetcode\.com$'
29+
;
30+
```
31+
32+
## Site Solution
33+
34+
```sql
35+
-- LeetCode Solution
36+
-- TBD
37+
```
38+
39+
## Notes
40+
41+
TBD
42+
43+
## NB
44+
45+
Regex
46+
47+
Go to [Index](../?tab=readme-ov-file#index)\
48+
Go to [Overview](../?tab=readme-ov-file)

0 commit comments

Comments
 (0)