It would be easier, if you included the exact error message and your RDBMS.
Maybe your RDBMS doesn't support Derived Tables or you forgot the table alias:
select ..
from (select ...) tablealias
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.