Re: [sqlite] I need help understanding fake columns

2006-05-22 Thread Jay Sprenkle
On 5/22/06, Brannon King <[EMAIL PROTECTED]> wrote: > If I understand it right you'll definitely need a correlated subquery. > You need one query to calculate the max() of the 257(0-256?) values. > There must be some way to define which values should be used > in that calculation for a specific

RE: [sqlite] I need help understanding fake columns

2006-05-22 Thread Brannon King
> If I understand it right you'll definitely need a correlated subquery. > You need one query to calculate the max() of the 257(0-256?) values. > There must be some way to define which values should be used > in that calculation for a specific piece (the distance). Is > the distance geometric

Re: [sqlite] I need help understanding fake columns

2006-05-22 Thread Jay Sprenkle
On 5/21/06, Brannon King <[EMAIL PROTECTED]> wrote: Jay Sprenkle wrote: >> score(x,y) = max(score(x+n,y+n)-n*penalty) where n < drc(x+n,y+n) < 256 > > So at some 'sample' you have the score and drc, but not the x,y value? > The x,y values can be interpolated using some algebra and the

Re: [sqlite] I need help understanding fake columns

2006-05-21 Thread Brannon King
Jay Sprenkle wrote: score(x,y) = max(score(x+n,y+n)-n*penalty) where n < drc(x+n,y+n) < 256 So at some 'sample' you have the score and drc, but not the x,y value? The x,y values can be interpolated using some algebra and the surrounding samples? Uh, no. Sorry my other emails were unclear. At

Re: [sqlite] I need help understanding fake columns

2006-05-21 Thread Jay Sprenkle
On 5/20/06, Brannon King <[EMAIL PROTECTED]> wrote: So here's the real problem. Sorry about the long explanation, but if anyone wants to help with the query, that would be great. I have a 2d sparse matrix in a table where each point has two values, a score and a diagonal run count. In other

Re: [sqlite] I need help understanding fake columns

2006-05-20 Thread Brannon King
Dennis Cote wrote: Where did you get the idea there are "fake" columns? "SELECT 200" returns 200. I'd call that a fake column. What is the proper name for it? What I was picturing was something like this: "SELECT (BETWEEN 200 AND 500) as a, a+2" and then get 300 outputs. That would be

Re: [sqlite] I need help understanding fake columns

2006-05-20 Thread Dennis Cote
On 5/20/06, Dennis Cote <[EMAIL PROTECTED]> wrote: Brandon, ... Brannon, I'm sorry I got your name wrong. I try to be careful about that, but I now see your's slipped by me a couple of times. Dennis Cote

Re: [sqlite] I need help understanding fake columns

2006-05-20 Thread Dennis Cote
On 5/19/06, Brannon King <[EMAIL PROTECTED]> wrote: So I first had these commands: create table blah (b INTEGER, c INTEGER); insert into blah values(400,300); insert into blah values(360,250); select a,max(b-a) from blah where c=a and a > 200 and a < 500; And how do I simply return a range of