-- select -- case -- when A=B and B=C then "Equilateral" -- when A=B or B=C or A=C then "Isosceles" -- --(1 1 0 is not a triangle, next line should come befor this line) -- when A+B<=C or A+C<=B or B+C<=A then "Not A Triangle" -- else "Scalene" -- end -- from TRIANGLES
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 or B=C or A=C then "Isosceles" else "Scalene" end from TRIANGLES
-- A+B>C -> A+B+C>2*C greatest(A,B,C):select max select case when greatest(A,B,C)*2>=(A+B+C) then "Not A Triangle" when A=B and B=C then "Equilateral" when A=B or B=C or A=C then "Isosceles" else "Scalene" end from TRIANGLES