Whatever mangled the text must have put a 2 in front of the 7, cause the copy
in my sent mail box has a 1 in front of the 7.?? I never got a copy of my email
from the mailing list, so I never saw the mangled version, just quotes of it. I
assumed you made the typo and didn't want to nit-pick someone trying to help me.
At any rate,? Igor gave me the answer to my question, so unless someone comes
up with a different solution, the problem is solved. (in that sql is not a good
place to solve the problem...)
Thanks,
David
From: R Smith <rsmith at rsweb.co.za>
To: sqlite-users at mailinglists.sqlite.org
Sent: Thursday, February 18, 2016 12:11 PM
Subject: Re: [sqlite] MIN/MAX query
On 2016/02/18 4:59 PM, Igor Tandetnik wrote:
> On 2/18/2016 4:55 AM, R Smith wrote:
>> First of, your intended results require a fundamentally wrong assumption
>> about Sets. (SQL is essentially operating on SETs and sets have no
>> order).
>> You should really have another column, like a primary key ID that notes
>> the position of each line
>
> Looks like L is precisely such an ID. The OP is looking for runs of
> identical (I, V) pairs when the table is scanned in order by (I, L)
> (or, in other words, for each value of I, runs of V's in order by L).
>
> If that's the case, then //...
That was my first impression too Igor, but look again, I goes to 2 while
L is still lingering on 7... the very next line sees L going to 1 while
I is 2 to produce a moment when the order is not at all as sensible and
breaks any formal ordering that can be seen as a run. L will again get
to 7... will it definitely be after I changes?
Perhaps it was late and the OP was tired, but the example is not
sensible as given without another column.
_______________________________________________
sqlite-users mailing list
sqlite-users at mailinglists.sqlite.org
http://mailinglists.sqlite.org/cgi-bin/mailman/listinfo/sqlite-users