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

Appearance settings

Commit bfeb3ab

Browse filesBrowse files
committed
Update README.md
1 parent 074d187 commit bfeb3ab
Copy full SHA for bfeb3ab

File tree

1 file changed

+23
-0
lines changed
Filter options

1 file changed

+23
-0
lines changed

‎README.md

Copy file name to clipboardExpand all lines: README.md
+23Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -379,4 +379,27 @@ WHERE primary_flag = 'Y' OR employee_id IN
379379
GROUP BY employee_id
380380
HAVING COUNT(department_id) = 1
381381
)
382+
```
383+
384+
[610. Triangle Judgement](https://leetcode.com/problems/triangle-judgement/)
385+
386+
```sql
387+
SELECT x, y, z,
388+
CASE WHEN x + y > z AND x + z > y AND y + z > x THEN 'Yes'
389+
ELSE 'No' END AS triangle
390+
FROM Triangle
391+
```
392+
393+
[180. Consecutive Numbers
394+
](https://leetcode.com/problems/consecutive-numbers/)
395+
```sql
396+
WITH cte AS (
397+
SELECT id, num,
398+
LEAD(num) OVER (ORDER BY id) AS next,
399+
LAG(num) OVER (ORDER BY id) AS prev
400+
FROM Logs
401+
)
402+
SELECT DISTINCT(num) AS ConsecutiveNums
403+
FROM cte
404+
WHERE num = next AND num = prev
382405
```

0 commit comments

Comments
0 (0)
Morty Proxy This is a proxified and sanitized view of the page, visit original site.