|
|
Archives of the TeradataForum
Message Posted: Fri, 17 Jun 2005 @ 09:46:23 GMT
Subj: | | Back to SQL School |
|
From: | | Kambhoji, Naveen Ram Prasanna |
Hi Gurus,
Does the following queries return the same result?
Obviously not,any explanations for why they wont return the same result is much appreciated
SELECT CAST(T.EFF_DATE AS VARCHAR(10)) FROM LOAD_TRACKING T
GROUP BY T.EFF_DATE
HAVING MAX(T.STAGE) = 3
ORDER BY T.EFF_DATE DESC;
SELECT CAST(T.EFF_DATE AS VARCHAR(10)) FROM LOAD_TRACKING T
WHERE T.STAGE=3
GROUP BY T.EFF_DATE
ORDER BY T.EFF_DATE DESC;
TIA
| |