A query that gives the correct answer in 10.2 daabase is failing when run on 11.2.0.1.
select count(*) from profile p where end_time <= (COALESCE((
SELECT MIN(ip.end_time) FROM profile ip
WHERE
ip.device_id = p.device_id AND
ip.end_time >=
TIMESTAMP'2012-02-08 00:00:00 UTC'
),
TIMESTAMP'2012-02-08 00:00:00 UTC'
) )
Any ideas on why this might fail for 11g?
Thanks