text: -------------------------
  -- PARTITION BY
  -------------------------
  SELECT
    CINEMAS.NAME                                     AS CINEMA,
    PAYMENT_TYPES.NAME                               AS PAYMENT_TYPE,
    count(*)                                         AS COUNT,
    SUM(count(*)) OVER (PARTITION BY (CINEMAS.NAME)) AS COUNT_IN_CINEMA,
    ROUND(100 * (
      count(*) / SUM(count(*)) OVER (PARTITION BY (CINEMAS.NAME))
    ), 2) AS PERCENT_PART
  FROM SALES
    JOIN CINEMAS ON SALES.CINEMA_ID = CINEMAS.ID
    JOIN PAYMENT_TYPES ON SALES.PAYMENT_TYPE_ID = PAYMENT_TYPES.ID
  GROUP BY (CINEMAS.NAME, PAYMENT_TYPES.NAME)
  ORDER BY CINEMA, PERCENT_PART DESC