That's not valid SQL and I can't tell what it is you're trying to achieve from it. First you need to understand what subqueries are for. Like any query, a subquery creates a result set that contains records. You can think of a subquery as a temporary table and, as such, you can use it anywhere you could use a table. Could you possibly replace that subquery with a table name? Of course not. The SQL simply wouldn't make sense. So, what exactly are you trying to achieve? Maybe this is something you could have told us in the first place. If you want us to help you, don't you think it would be useful for us to know what you're trying to do?