Re: [sqlite] Question about aggregate functions used multiple times

2013-09-11 Thread Clemens Ladisch
James Powell wrote: > SELECT MAX(X) AS MaxX, MAX(X)/MIN(X) AS RatioX > > does the MAX(X) get calculated twice, or does SQLite identify that it > is the same number and do it only once? At least in version 3.8.0.2, it gets calculated only once. Please note that SQLite can optimize MIN/MAX calculat

[sqlite] Question about aggregate functions used multiple times

2013-09-11 Thread James Powell
In the following expression: SELECT MAX(X) AS MaxX, MAX(X)/MIN(X) AS RatioX does the MAX(X) get calculated twice, or does SQLite identify that it is the same number and do it only once? Thanks, — James ___ sqlite-users mailing list sqlite-users@sqlite