[GENERAL] SQL Agreate Functions

2004-11-02 Thread Alex P
Hi, I have a problem I dont really know how to solve except for writing a function. I have a table with prices; SecCode| Price | PriceDate ---++--- A0001 | 13.10 | 2004-10-30 A0001 | 13.03 | 2004-10-29 A0001 | 13.12 | 2004-10-28 A0001 | 12.45 | 2004-10-27 A0001

Re: [GENERAL] SQL Agreate Functions

2004-11-02 Thread Richard Huxton
Alex P wrote: Hi, I have a problem I dont really know how to solve except for writing a function. [snip] What I would like to calculate is: a) the difference of the past 2 days for every security of available prices Find the maximum date for a give SecCode (simple enough) and then the maximum da