sql: voters statistics query