complete query