DDF-48: Added a complex query to the test so that it could test changes
made in this ticket.