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

Skip to content

Commit cc91e5d

Browse files
committed
Update README.md
1 parent 049a89d commit cc91e5d

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

README.md

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -503,3 +503,16 @@ SELECT *
503503
FROM Users
504504
WHERE mail REGEXP '^[A-Za-z][A-Za-z0-9_\.\-]*@leetcode\\.com$'
505505
```
506+
507+< 8422 /span>
[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+
```

0 commit comments

Comments
 (0)
0