Updated delete query