Add query builder

Add query builder.