synatic / noql

Converts SQL queries to Mongo find or aggregates
https://noql.synatic.dev/
GNU General Public License v3.0
47 stars 12 forks source link

Additional fixes for chaining functions in group by #163

Closed eXigentCoder closed 10 months ago

eXigentCoder commented 10 months ago

Previously the following would not work:

SELECT customerId,
              ROUND(sum(price),0) as roundSumPrice,
              sum(ROUND(price,0)) as sumRoundPrice
      FROM orders
      GROUP BY customerId
      ORDER BY customerId ASC

Specifically the 2nd column would throw an error but the 3rd would succed. This PR adds support for the first case.