Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
15 lines
418 B
Plaintext
15 lines
418 B
Plaintext
@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,
|
|
max( c.amount ) as total_amount
|
|
}
|
|
group by
|
|
r.rental_id,
|
|
r.customer
|