Skip to content

Commit 5435b71

Browse files
committed
added triangle inequality
1 parent 8c1f482 commit 5435b71

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
# Write your MySQL query statement below
2+
-- Using the triangle inequality:
3+
4+
-- x + y > z
5+
-- x + z > y
6+
-- y + z > x
7+
8+
SELECT x, y, z, CASE WHEN (x+y) > z AND (x+z) > y AND (y+z) > x THEN
9+
'Yes' ELSE 'No' END AS triangle
10+
FROM Triangle;

0 commit comments

Comments
 (0)