Stage 2 summary at 50 accepted trajectories
Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
This commit is contained in:
25
tasks_gen/train/G1080/faulty/m4_i_vend_state.ddls.asddls
Normal file
25
tasks_gen/train/G1080/faulty/m4_i_vend_state.ddls.asddls
Normal file
@@ -0,0 +1,25 @@
|
||||
@AccessControl.authorizationCheck: #NOT_REQUIRED
|
||||
@EndUserText.label: 'Vending machine state'
|
||||
define view entity {{P}}I_VEND_STATE
|
||||
as select from {{p}}vmach as machine
|
||||
inner join {{p}}vslot as slot on slot.machine_id = machine.machine_id
|
||||
{
|
||||
key machine.machine_id as machine_id,
|
||||
upper( machine.location ) as location,
|
||||
count( * ) as slot_count,
|
||||
cast( sum( case when slot.fill_level = 0
|
||||
then 1
|
||||
else 0
|
||||
end ) as abap.int4 ) as empty_slots,
|
||||
division( sum( slot.fill_level ) * 100,
|
||||
sum( slot.max_units ), 1 ) as fill_rate,
|
||||
case
|
||||
when sum( slot.fill_level ) = 0 then 'EMPTY'
|
||||
when division( sum( slot.fill_level ) * 100,
|
||||
sum( slot.max_units ), 1 ) >= 25 then 'LOW'
|
||||
else 'OK'
|
||||
end as status
|
||||
}
|
||||
group by
|
||||
machine.machine_id,
|
||||
machine.location
|
||||
Reference in New Issue
Block a user