All pastes #519540 Raw Edit

Anonymous

public text v1 · immutable
#519540 ·published 2007-05-29 18:06 UTC
rendered paste body
SELECT b.bra_code, b.bra_location, at.acctyp_code, at.acctyp_desc, SUM(a.accnt_bal) AS "Total Current Value"
FROM BRANCH b, ACCTYPE at, CUSTOMER c, ACCOUNT a
WHERE c.cust_no = a.cust_no
  AND c.bra_code = b.bra_code
  AND at.acctyp_code = a.acctyp_code
GROUP BY b.bra_code, b.bra_location, at.acctyp_code, at.acctyp_desc
ORDER BY b.bra_code;