@AccessControl.authorizationCheck: #NOT_REQUIRED @EndUserText.label: 'Station energy totals' define view entity {{P}}I_STATION_ENERGY as select from {{p}}station as st left outer join {{p}}session as se on se.station_id = st.station_id and se.status = 'C' { key st.station_id as station_id, st.city as city, count( se.session_id ) as session_count, sum( se.energy_kwh ) as total_energy } group by st.station_id, st.city