sql for handling target gang votes