Anonymous
public sql v1 · immutableSELECT b.bra_code, b.bra_location, at.acctyp_code, at.acctyp_desc, if(at.acctype_code, SUM(a.accnt_bal), '$0') AS "Total Current Value"FROM BRANCH b, CUSTOMER c, ACCOUNT a LEFT OUT ACCTYPE at on at.acctyp_code = a.acctyp_codeWHERE c.cust_no = a.cust_no AND c.bra_code = b.bra_code AND at.acctyp_code = a.acctyp_codeGROUP BY b.bra_code, b.bra_location, at.acctyp_code, at.acctyp_descORDER BY b.bra_code;