Write a query identifying the type of each record in the TRIANGLES table using its three side lengths. Output one of the following statements for each record in the table:
Equilateral: It's a triangle with sides of equal length. Isosceles: It's a triangle with sides of equal length. Scalene: It's a triangle with sides of differing lengths. Not A Triangle: The given values of A, B, and C don't form a triangle.
Can someone plz point out what is wrong here :
select if(a=b=c,'Equilateral',
(select if(a=b or b=c or c=a,'Isosceles', select if( a+b Triangle','Scalene'))))
from triangles;