thanks a lot for all your help. it is a view that we going to bring over through the db-link. so do you mean only the group by functions will engender the usage of temp ts and not other functions.