code: def languages(self):
          language = PageView.headers['Accept-Language']
          first_language = fn.SubStr(
              language,
              1,
              fn.StrPos(language, ';'))
          return (self.get_query()
                  .select(first_language, fn.Count(PageView.id))
                  .group_by(first_language)
                  .order_by(fn.Count(PageView.id).desc())
                  .tuples())