Files
abap-llm/tasks_gen/eval/G0019/faulty/m2_i_sales_class.ddls.asddls

15 lines
743 B
Plaintext

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Sales items by region and size class'
define view entity {{P}}I_SALES_CLASS
as select from {{p}}sale
{
key region as region,
count( * ) as item_count,
sum( case when amount < 100 then 1 else 0 end ) as small_count,
sum( case when amount >= 100 and amount >= 1000 then 1 else 0 end ) as medium_count,
sum( case when amount >= 1000 then 1 else 0 end ) as large_count,
sum( amount ) as total_amount
}
where status <> 'X'
group by region