Add test for chained queries and condition (query syntax)