![]() |
|
Archives of the TeradataForumMessage Posted: Mon, 18 Jul 2005 @ 12:28:52 GMT
The last part was copied twice. Below is the SQL
> select x
> ,count(x)
>
> from x
>
> where date BETWEEN ( Select Max(rec_date) from y) and ( Select
add_months(Max(rec_date + 1), -3) - 1 from y)
>
> group by 1
> order by 1;
| ||||||||||||||||||||||||||||||||||||||||||||||||
| | ||||||||||||||||||||||||||||||||||||||||||||||||
| ||||||||||||||||||||||||||||||||||||||||||||||||
![]() | ||||||||||||||||||||||||||||||||||||||||||||||||
| Last Modified: 30 Jun 2008 | ||||||||||||||||||||||||||||||||||||||||||||||||