Where you are saying "pages (or sub pages)" I think is where the query I described as "VIEW configurations" would help.
Whether there is data in the tables, you would have to do on a case by case basis I think (derive your own SQL), not convinced that there would be a generic SQL statement to help you there without starting to do silly things like interrogating the database data-dictionary (which would just be more fiddly than writing your own SQL).
You don't mention portlets either (rather than just object views) - i.e. do you need to know where the attributes appear in NSQL portlets, thats another case too and this might help there ; Search All NSQL And GEL Scripts