You are on page 1of 1

data: sum type i, cnt type i, wa_spfli type spfli, wa_sflight type sflight, wa_sbook type sbook.

select * from spfli into wa_spfli order by cityfrom cityto connid. skip. write: / wa_spfli-carrid, wa_spfli-connid, 'from', (15) wa_spfli-cityfrom, 'to', (15) wa_spfli-cityto. uline. select * from sflight into wa_sflight where carrid = wa_spfli-carrid and connid = wa_spfli-connid order by fldate. skip. write: / 'Date:', wa_sflight-fldate. write: 20 'Book-ID', 40 'Smoker', 50 'Class'. uline. sum = 0. cnt = 0. select * from sbook into wa_sbook where carrid = and connid = and fldate = order by class

wa_sflight-carrid wa_sflight-connid wa_sflight-fldate smoker bookid.

write: / wa_sbook-bookid under 'Book-ID', wa_sbook-smoker under 'Smoker', wa_sbook-class under 'Class'. sum = sum + wa_sbook-luggweight. cnt = cnt + 1. endselect. uline. write: 'Number of bookings: ', (3) cnt, / 'Total luggage weight:', (3) sum, wa_sbook-wunit. endselect. endselect.

You might also like