Kenzuke

Durchschnitt Plätze

Jan 26th, 2020
381
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. DATA:
  2. sc type scarr,
  3. sf type sflight,
  4. sp type spfli,
  5. anz type i,
  6. summe_plaetze type i,
  7. avg(4) type p DECIMALS 2.
  8.  
  9. select * from scarr into sc.
  10.   select * from spfli into sp
  11.     where CARRID = sc-CARRID.
  12.   write : / sc-carrid,sc-CARRNAME,sp-CONNID,sp-cityfrom,sp-cityto.
  13. select * from sflight into sf
  14.   where CONNID = sp-CONNID.
  15.   write : / sf-FLDATE,sf-price,sf-currency,sf-seatsocc.
  16.   anz = anz + 1.
  17.   summe_plaetze = summe_plaetze + sf-seatsocc.
  18.   ENDSELECT.
  19.  
  20.     write : / anz.
  21.     avg = summe_plaetze / anz.
  22.     write : / avg.
  23.   ENDSELECT.
  24.   ENDSELECT.
RAW Paste Data

Adblocker detected! Please consider disabling it...

We've detected AdBlock Plus or some other adblocking software preventing Pastebin.com from fully loading.

We don't have any obnoxious sound, or popup ads, we actively block these annoying types of ads!

Please add Pastebin.com to your ad blocker whitelist or disable your adblocking software.

×