I'm not too sure what you think the group by is going to do in this case.
The subquery is going to return 60000 and pick records less than that, whitch it looks like its doing.
When you removed the where clause you stoped looking at just those records in the subquery that match the outer query so the max of all records in the table is returned(60000).
The first way you had your query was correct.
Oracle is like a database of databases, The main database is called an "instance". inside the instance are users or schemas. the users have tables and columns like payroll and addresses. But the Instance also has tables that hold things like user_names, table_names and tables that hold where to put the log files and things like that. The admin user run the space allocations, monitoring the database and create users.
Another option is to determine what data is most important and encrypt those columns. You will take a hit on speed to encrypt and decrypt but it would protect your data more. A lot of work for little payback if you ask me.
That means other general users will not be able to see them but the the adminstration user does backups, create users, grant roles, exports and imports so it needs to be able to get at to all data. Think of it as a super user.
The only way you might be able to do what you want is to have the user enter the adminsration id and password that was used to install oracle and change it to something only your program will know. But there is high risk in doing this.
When someone answers this I will most likely have a duh moment.
I have been having this problem since I started with eclipse. I use hibernate and have a hibernate.cfg.xml file in the bin directory. Sometimes when I do a compile and every time I do a clean the hibernate.cfg.xml is deleted from the bin so I have to copy it back to get my project to run. My question is how can I stop it from being deleted? There is a log4j.properties file in the same bin directory that does not get deleted, so there must be a way.