select * from (
select nct.user_id,count(so.order_no) as ordercount
from NETCARROTS_TRANSACTIONS nct, cust_info ci, shopcart_order so
where nct.user_id=ci.user_id and status='y' and so.order_no=nct.order_no
and so.dateorder between '01-feb-2002'
and '01-apr-2002' group by nct.user_id
order by ordercount desc )
where rownum < 6




Reply With Quote