Author Topic: sqlite max AND min  (Read 432 times)

Offline Grincheux

  • Member
  • *
  • Posts: 84
  • Never be pleased, always improve
    • Arachne
sqlite max AND min
« on: October 24, 2020, 01:33:52 pm »
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
« Last Edit: October 24, 2020, 01:37:02 pm by Grincheux »
Kenavo / Bye