Re: [SQL] Your question about date
Perhaps it will be better if you put an 'order by' in the select. SELECT (( select test1.date from test test1 where test1.date > test.date order by date limit 1) - test.date ) AS result from test order by date; result 42 31 33 25 Re
Re: [SQL] Your question about date
Dear Christoph, perhaps you could try something like this example. Regards, BÃatrice The table: -- # select * from test; date 2005-02-02 2005-03-05 2005-04-07 2005-05-02 (4 rows) The query -- SELECT (( select test1.date from test test1