update labels and sql