On 15/03/07, T E Schmitz <mailreg(at)numerixtechnology(dot)de> wrote:(...)
Try join the tables.
SELECT present.day, present.low, (MIN(future.day)-present.day) as
>
days2fall FROM history AS present JOIN history AS future ON ( present.day <
> future.day AND
> future.low <= present.low )
> GROUP BY present.day,present.low
> ORDER BY days2fall DESC
--
William Leite Araújo
Analista de Banco de Dados - QualiConsult