Updated query builder.