Hi Team,
we have below query , where we are geting stange results, if i just run Inner Query - A alone, i get lets say 100
records but when i run complete query , i.e. lefter outer join with Inner Query - B many records gets filtered out,
some how i am unable to understand this phenomenon.
Also if i remove ( mac(c) and just make it as C and add it to the group by ) i get complete 100 rows.
please help me out on this.
select
A,
b,
c,
d,
e,
F
(
select
a
b
max(c)
sum(d)
sum(e)
from Table1
group by 1,2) A
left outer join
(
select
a
b
max(F)
from Table2
group by 1,2) B
on
A.a = B.a
and A.b = B.b
Forums: