Q4

mail@pastecode.io avatar
unknown
mysql
2 years ago
239 B
2
Indexable
Never
-- Q4: 
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'
    WHEN A<>B AND B<>C AND C<>A THEN 'Scalene'
  END tuple
FROM TRIANGLES;