Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- DATA:
- sc type scarr,
- sf type sflight,
- sp type spfli,
- anz type i,
- summe_plaetze type i,
- avg(4) type p DECIMALS 2.
- select * from scarr into sc.
- select * from spfli into sp
- where CARRID = sc-CARRID.
- write : / sc-carrid,sc-CARRNAME,sp-CONNID,sp-cityfrom,sp-cityto.
- select * from sflight into sf
- where CONNID = sp-CONNID.
- write : / sf-FLDATE,sf-price,sf-currency,sf-seatsocc.
- anz = anz + 1.
- summe_plaetze = summe_plaetze + sf-seatsocc.
- ENDSELECT.
- write : / anz.
- avg = summe_plaetze / anz.
- write : / avg.
- ENDSELECT.
- ENDSELECT.
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement