Query commands, nested and correlated queries