Calculating values in SQL instead of NodeRed

SQL server uses the syntax SELECT TOP 1 * FROM ...

not ... LIMIT 1