News:

Download Pelles C here: http://www.smorgasbordet.com/pellesc/

Main Menu

sqlite max AND min

Started by Grincheux, October 24, 2020, 01:33:52 PM

Previous topic - Next topic

Grincheux

Usually MAX and MIN are used like this SELECT MIN([C1]) AS Mini,MAX([C2)) AS Maxi FROM [MyTable];

There is an other way to use them

SELECT MAX([C1],[C2],][C3]) AS MAX_C1_C2_C3, MIN([C1],[C2],[C3]) AS MIN_C1_C2_C3 FROM [MyTable];

Becareful, I have used it on a table with one record, if there are many hundreds of records you have to drink a lot of coffee before getting the result. ;D ;D ;D