@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Film revenue' define view entity {{P}}I_FILM_REVENUE as select from {{p}}screen as s inner join {{p}}ticket as t on t.show_id = s.show_id { key s.film as film, count( * ) as ticket_count, sum( t.price ) as revenue } where s.status = 'Z' group by s.film