Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_014aUaQeLnwbb1zTpN7kHeat
16 lines
506 B
Plaintext
16 lines
506 B
Plaintext
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
|
@EndUserText.label: 'Play statistics'
|
|
define view entity {{P}}I_PLAY_STATS
|
|
as select from {{p}}play as play
|
|
inner join {{p}}perf as perf on perf.play_id = play.play_id
|
|
{
|
|
key play.play_id as play_id,
|
|
play.title as title,
|
|
count( * ) as performance_count,
|
|
sum( perf.tickets_sold ) as total_tickets,
|
|
sum( perf.revenue ) as total_revenue
|
|
}
|
|
group by
|
|
play.play_id,
|
|
play.title
|