[sqlite] MIN/MAX query

2016-02-18 Thread R Smith
On 2016/02/18 7:24 PM, David Bicking wrote: > 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 assu

[sqlite] MIN/MAX query

2016-02-18 Thread R Smith
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 primar

[sqlite] MIN/MAX query

2016-02-18 Thread Jason H
umns, but the cluster changes if > any of the columns change, so for simplification, I just noted them as one > value column.) > Thanks for your help. > David > From: R Smith > To: sqlite-users at mailinglists.sqlite.org > Sent: Thursday, February 18, 2016 4:55 AM > Subject:

[sqlite] MIN/MAX query

2016-02-18 Thread David Bicking
e.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 o

[sqlite] MIN/MAX query

2016-02-18 Thread David Bicking
Thanks. You understood my intention, and confirmed my fear that I couldn't do it efficiently in SQL. David From: Igor Tandetnik To: sqlite-users at mailinglists.sqlite.org Sent: Thursday, February 18, 2016 9:59 AM Subject: Re: [sqlite] MIN/MAX query On 2/18/2016 4:55 AM, R

[sqlite] MIN/MAX query

2016-02-18 Thread David Bicking
plification, I just noted them as one value column.) Thanks for your help. David From: R Smith To: sqlite-users at mailinglists.sqlite.org Sent: Thursday, February 18, 2016 4:55 AM Subject: Re: [sqlite] MIN/MAX query Let me see if I can unpuzzle this question - kindly say i

[sqlite] MIN/MAX query

2016-02-18 Thread R Smith
Let me see if I can unpuzzle this question - kindly say if it is not correctly assumed: - I have a table: I L V 1 1 A 1 2 A 1 3 A 1 4 B 1 5 B 1 6 A 2 7 A 2 1 C 2 2 C I want to return the minimal and maximum L for each "group" of V in a given I. The

[sqlite] MIN/MAX query

2016-02-18 Thread Clemens Ladisch
David Bicking wrote: > I have a table > I L V > 1 1 A > 1 2 A > 1 3 A > 1 4 B > 1 5 B > 1 6 A > 1 7 A > 2 1 C > 2 2 C > I want to return the minimal and maximum L for each "group" of V in a given I. > > The result I want: > I MinL MaxL V > 1 13 A > 1 4

[sqlite] MIN/MAX query

2016-02-18 Thread Igor Tandetnik
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 l

[sqlite] MIN/MAX query

2016-02-17 Thread no...@null.net
On Wed Feb 17, 2016 at 06:17:40PM +, David Bicking wrote: > I have a table > I? L? V1 1?? A1 2?? A1 3?? A1 4?? B1 5 ? B1 6?? A1 7?? A2 1 ? C2 2?? C The formatting of this (and your desired results) does not make the question clear enough. Can you resend with each row on a separate line and p

[sqlite] MIN/MAX query

2016-02-17 Thread David Bicking
On 02/17/2016 03:22 PM, nomad at null.net wrote: > On Wed Feb 17, 2016 at 06:17:40PM +, David Bicking wrote: >> I have a table >> I L V1 1 A1 2 A1 3 A1 4 B1 5 B1 6 A1 7 A2 1 C2 2 C > The formatting of this (and your desired results) does not make the > question clear enough.

[sqlite] MIN/MAX query

2016-02-17 Thread David Bicking
I have a table I? L? V1 1?? A1 2?? A1 3?? A1 4?? B1 5 ? B1 6?? A1 7?? A2 1 ? C2 2?? C I want to return the minimal and maximum L for each "group" of V in a given I. The result I want: I? MinL? MaxL? V1? 1??? 3? A1? 4??? 5?? B1? 6??? 7?? A2? 1??? 2