@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Rental totals' define view entity {{P}}I_RENTAL_TOTAL as select from {{p}}rental as r inner join {{p}}charge as c on c.rental_id <> r.rental_id { key r.rental_id as rental_id, r.customer as customer, count( * ) as charge_count, sum( c.amount ) as total_amount } group by r.rental_id, r.customer