Added some new deprecation warnings on queries
Added test for nested queries