Re: Need recommendation regarding IN expression
Thank you!
I do need GROUP BY because I will be selecting time on page per registrant (I made a mistake in the first query). But anyway, I see know that INNER JOIN is a better solution.
So I will rewrite the query like this:
SELECT registrant_id, SUM(time_on_page)
FROM page_views p
INNER JOIN selected_registrants s
ON p.registrant_id = s.registrant_id
AND s.report_id = 1569
GROUP BY registrant_id;
BTW, you specified the s.report_id = 1569 as JOIN condition rather than WHERE condition, is it more efficient?
Thanks, Solon.
Edited 2 time(s). Last edit at 02/23/2006 02:57AM by Solon Barns.
Subject
Views
Written By
Posted
3178
February 22, 2006 12:52PM
2110
February 22, 2006 01:29PM
Re: Need recommendation regarding IN expression
1840
February 23, 2006 12:59AM
2165
February 23, 2006 10:55AM
Sorry, you can't reply to this topic. It has been closed.
Content reproduced on this site is the property of the respective copyright holders.
It is not reviewed in advance by Oracle and does not necessarily represent the opinion
of Oracle or any other party.