We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
- Prepare
- SQL
- Advanced Select
- Type of Triangle
- Discussions
Type of Triangle
Type of Triangle
Sort by
recency
|
3205 Discussions
|
Please Login in order to post a comment
SELECT CASE WHEN a + b <= c OR b + c <= a OR a + c <= b THEN 'Not A Triangle' WHEN a = b AND b = c THEN 'Equilateral' WHEN a=b OR b=c OR c=a THEN 'Isosceles' ELSE 'Scalene' END from triangles;
select case when (a+b
ORACLE: SELECT CASE WHEN A+B<=C OR A+C<=B OR B+C<=A THEN 'Not A Triangle' WHEN A=B AND B=C THEN 'Equilateral' WHEN A<>B AND B<>C AND C<>A THEN 'Scalene' ELSE 'Isosceles' END FROM Triangles;
select case when (A+B<=C) OR (B+C<=A) OR (C+A<=B) THEN 'Not A Triangle' WHEN A=B AND B=C THEN 'Equilateral' WHEN A=B OR B=C OR C=A THEN 'Isosceles' ELSE 'Scalene' END AS TYPE_OF_TRIANLE FROM TRIANGLES;
select case when NOT(A+B>C AND A+C>B AND B+C>A) then "Not A Triangle" when (A=B AND B<>C) OR (A=C AND A<>B) OR (B=C AND B<>A) then "Isosceles" when A<>B AND B<>C then "Scalene" when A=B AND B=C then "Equilateral" end as output from TRIANGLES GROUP BY A,B,C;