test sub query using Query facade.