Update for queries