Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commit049a89d

Browse files
committed
Update README.md
1 parentab8f703 commit049a89d

File tree

1 file changed

+46
-1
lines changed

1 file changed

+46
-1
lines changed

‎README.md

Lines changed: 46 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -457,4 +457,49 @@ r.salary
457457
FROM Department d
458458
JOIN RankedSalaries rONr.departmentId=d.id
459459
WHEREr.salary_rank<=3;
460-
```
460+
```
461+
462+
463+
[1667. Fix Names in a Table](https://leetcode.com/problems/fix-names-in-a-table)
464+
```sql
465+
SELECT user_id, CONCAT(UPPER(LEFT(name,1)),LOWER(RIGHT(name, LENGTH(name)-1)))AS name
466+
FROM Users
467+
ORDER BY user_id
468+
```
469+
470+
[1527. Patients With a Condition](https://leetcode.com/problems/patients-with-a-condition)
471+
```sql
472+
SELECT patient_id, patient_name, conditions
473+
FROM patients
474+
WHERE conditionsLIKE'% DIAB1%'
475+
OR conditionsLIKE'DIAB1%'
476+
```
477+
478+
[196. Delete Duplicate Emails](https://leetcode.com/problems/delete-duplicate-emails)
479+
```sql
480+
DELETE p
481+
FROM Person p, Person q
482+
WHEREp.id>q.id
483+
ANDq.Email=p.Email
484+
```
485+
486+
[176. Second Highest Salary](https://leetcode.com/problems/second-highest-salary)
487+
```sql
488+
SELECT
489+
(SELECT DISTINCT Salary
490+
FROM Employee
491+
ORDER BY SalaryDESC
492+
LIMIT1 OFFSET1)
493+
AS SecondHighestSalary
494+
495+
-- HINT: subquery is used to return null if there is no SecondHighestSalary
496+
```
497+
498+
499+
500+
[1517. Find Users With Valid E-Mails](https://leetcode.com/problems/find-users-with-valid-e-mails)
501+
```sql
502+
SELECT*
503+
FROM Users
504+
WHERE mail REGEXP'^[A-Za-z][A-Za-z0-9_\.\-]*@leetcode\\.com$'
505+
```

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp