Outer query [message #648991] |
Wed, 09 March 2016 09:35 |
|
ssyr22
Messages: 38 Registered: December 2015 Location: PUNE
|
Member |
|
|
select date_id,
sum(case
when fmu.ip is not null then
impressions
else
0
end) as glam_internal_ip,
sum(case
when fmu.ip is null then
impressions
else
0
end) as glam_external_ip
select date_id,fmu.ip
from fact_media_user_day fmu, glam_internal_ip gi
where fmu.ip = gi.ip_address(+)
and date_id = 20160301
--and date_id <= 20160307
group by date_id;
In abode query I have to display sum(impresions) based on join condition of IP column.Also I have to display sum(impresions)for non matching of IP column .HOw can i display it?For matchind rows i have to used outer join in fmu table.
Can You please tell me?
|
|
|
|
|
|
|
|
|
|
Re: Outer query [message #649002 is a reply to message #649001] |
Wed, 09 March 2016 10:57 |
gazzag
Messages: 1118 Registered: November 2010 Location: Bedwas, UK
|
Senior Member |
|
|
A test case consists of DDL scripts to create any required tables or indexes, and DML scripts to populate those tables with data.
|
|
|