query exam data: count marks per exam group