Flag each debit: 'Large' if it is more than 50% of the account's total credits, else 'Normal'. Return txn_id, account_id, amount and flag for debits only.
9 rows with columns txn_id, account_id, amount, flag — first 3 shown:
| # | ||||
|---|---|---|---|---|
| 1 | 2 | 101 | 12000 | Normal |
| 2 | 3 | 101 | 8000 | Normal |
| 3 | 5 | 101 | 25000 | Normal |
Run your code to see the output here.