We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 074d187 commit bfeb3abCopy full SHA for bfeb3ab
README.md
@@ -379,4 +379,27 @@ WHERE primary_flag = 'Y' OR employee_id IN
379
GROUP BY employee_id
380
HAVING COUNT(department_id) = 1
381
)
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
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
405
```
0 commit comments