Company: Intuit
Difficulty: medium
In an accounting software system, the task is to generate a report that lists each account's IBAN along with the total number of transactions and the total transaction amount for both debit and credit transactions. The result should have the following columns: IBAN / total_debit_transactions / total_credit_transactions / total_debit_amount / total_credit_amount . IBAN - the IBAN code of the account total_debit_transactions - the total number of debit transactions total_credit_transactions - the total number of credit transactions total_debit_amount - the total amount of debit transactions in accounting format (see Note) total_credit_amount - the total amount of credit transactions The results should be sorted in ascending order by IBAN. Note: Ensure all decimal values are formatted to include trailing zeros if necessary, e.g., 5.00. Debit amounts should be presented in accounting notation format, such as "(1234.56)". Schema accounts name type &nb