home *** CD-ROM | disk | FTP | other *** search
/ Amiga MA Magazine 1998 #3 / amigamamagazinepolishissue1998.iso / bazy / bankn / expsum1.qry < prev    next >
Text File  |  1988-11-22  |  822b  |  43 lines

  1. ||||||||||||||||||||||||||||||||||||||||||||||||||||
  2. |
  3. |  This is an example of a query with two levels
  4. |  of totals.  Transactions are listed and totaled
  5. |  by Payee within Expense Code.
  6. |
  7. ||||||||||||||||||||||||||||||||||||||||||||||||||||
  8.  
  9. select
  10.      (type = "C" or "W" or "S") and
  11.      (date > "123187" and date < "083188")
  12.  
  13. sort
  14.    ec, payee
  15.  
  16. report
  17.  
  18.    top(ec)
  19.       ec
  20.  
  21.    detail
  22.       col 6 payee
  23.       col 29 total(amount) "%99,999.99"
  24.  
  25.    bottom(payee)
  26.       col 29 "---------"
  27.       skip
  28.       col 15 "Payee Total:"
  29.       col 38 total(amount) "%99,999.99"
  30.  
  31.    bottom(ec)
  32.       col 38 "---------"
  33.       skip
  34.       col 18 "EC total:"
  35.       col 47 total(amount) "%99,999.99"
  36.       skip 2
  37.  
  38.    report_bottom
  39.       col 47 "---------"
  40.       skip
  41.       col 13 "Overall Total:"
  42.       col 47 total(amount) "%99,999.99"
  43.