Files
abap-llm/tasks_gen/eval/G0166/faulty/m2_i_play_stats.ddls.asddls

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,
max( perf.tickets_sold ) as total_tickets,
sum( perf.revenue ) as total_revenue
}
group by
play.play_id,
play.title