Pelles C forum

C language => Beginner questions => Topic started by: timharvey on June 16, 2024, 02:18:38 PM

Title: Question about sqlite max AND min
Post by: timharvey on June 16, 2024, 02:18:38 PM
Hello, Normally Max and Min will be used like this SELECT MIN([C1]) AS Mini,MAX([C2)) AS Maxi FROM [MyTable]. But with many records, the output results take a long time.

Is there any use for faster retrieval? Thank
Title: Re: Question about sqlite max AND min
Post by: John Z on June 21, 2024, 11:05:24 AM
Hi timharvey,

I'm no expert but I reached out to a heavy user who said:

"For the Guy if he has a large number of records he must do two queries, one for max and one for min each one must be into a transaction"

Hope this helps.  This site does have SQL users but of course it is mainly about C and some assembly.

John Z