Files
abap-llm/tasks_gen/eval/G0147/reference/i_park_power.ddls.asddls

16 lines
552 B
Plaintext

@AccessControl.authorizationCheck: #NOT_REQUIRED
@EndUserText.label: 'Energy of one park'
define view entity {{P}}I_PARK_POWER
with parameters
p_park : abap.char(4)
as select from {{p}}turbine as turbine
inner join {{p}}prod as prod on prod.turbine_id = turbine.turbine_id
{
key turbine.turbine_id as turbine_id,
turbine.park_id as park_id,
sum( prod.energy_kwh ) as total_kwh,
count( * ) as day_count
}
where turbine.park_id = $parameters.p_park
group by turbine.turbine_id, turbine.park_id