Equivalent of least function from Postgesql

I need to compare values from two fields in the same measurement and output the minimum of them. How can I do that with an influx query ? Any idea or workaround is welcome.