8000 Update README.md · Atharv625/sql-50-leetcode@9b413c2 · GitHub
[go: up one dir, main page]

Skip to content

Commit 9b413c2

Browse files
committed
Update README.md
1 parent 991bc56 commit 9b413c2

File tree

1 file changed

+15
-14
lines changed

1 file changed

+15
-14
lines changed

README.md

Lines changed: 15 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -504,19 +504,6 @@ FROM Users
504504
WHERE mail REGEXP '^[A-Za-z][A-Za-z0-9_\.\-]*@leetcode\\.com$'
505505
```
506506

507-
[1907. Count Salary Categories](https://leetcode.com/problems/count-salary-categories/)
508-
```sql
509-
510-
SELECT 'Low Salary' AS category, SUM(IF(income<20000,1,0)) AS accounts_count
511-
FROM Accounts
512-
UNION
513-
SELECT 'Average Salary' AS category, SUM(IF(income>=20000 AND income<=50000,1,0)) AS accounts_count
514-
FROM Accounts
515-
UNION
516-
SELECT 'High Salary' AS category, SUM(IF(income>50000,1,0)) AS accounts_count
517-
FROM Accounts
518-
```
519-
520507
[1204. Last Person to Fit in the Bus](https://leetcode.com/problems/last-person-to-fit-in-the-bus/)
521508
```sql
522509
-- 1000 kg limit
@@ -532,4 +519,18 @@ FROM cte
532519
WHERE total_weight <=1000
533520
ORDER BY total_weight DESC
534521
LIMIT 1;
535-
```
522+
```
523+
524+
[1907. Count Salary Categories](https://leetcode.com/problems/count-salary-categories/)
525+
```sql
526+
527+
SELECT 'Low Salary' AS category, SUM(IF(income<20000,1,0)) AS accounts_count
528+
FROM Accounts
529+
UNION
530+
SELECT 'Average Salary' AS category, SUM(IF(income>=20000 AND income<=50000,1,0)) AS accounts_count
531+
FROM Accounts
532+
UNION
533+
SELECT 'High Salary' AS category, SUM(IF(income>50000,1,0)) AS accounts_count
534+
FROM Accounts
535+
```
536+

0 commit comments

Comments
 (0)
0