I have a function like this:
if(a>b,if(b>c,a,b),c)
This follows the syntax if(condition,true,false). I was looking for a way to convert this into an SQL query like so:
select case
when a>b then
case
when b>c then a
else b
end
else c
end
I thought of splitting the input and passing it on my own, but I was hoping there was a better way to do this. Any help is appreciated! Thanks in advance.