code: def _calculateValue(self):
          
          cmd = '''
                UPDATE V
                   SET value = (
                       SELECT MAX(value)
                         FROM Q
                        WHERE V.state = Q.state
                        GROUP BY state);'''
          self._cur.execute(cmd)
          self._conn.commit()
docs: This is max() over the actions of Q.