I don't think this will help, but it is another way to write the query. Problem is there is no relationship between T1 and T2.
SELECT A, B, c.ccount,d.dcount
FROM T2,
(SELECT COUNT(*) ccount FROM T1 WHERE X1=Y1) C,
(SELECT COUNT(*) dcount FROM T1 WHERE X2=Y2) D
WHERE MYDATE < '2002-10-14'
and c.ccount <> d.dcount
Is there some relation between T1 and T2? Otherwise, I don't know that this will get you what you really want. You need a relation between T1 and T2 so you can join on the link and get the right data.
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.