Company: Ubs_30june
Difficulty: medium
Calculate Account Tax from 2023 Income Problem Description A financial institution is building an online application to simplify tax calculations. For every account it totals the income received during the year 2023 and applies a fixed tax rate of 20% to that total. Write a SQL query that, for every account with income in 2023, returns the account's IBAN, its total 2023 income, the tax rate and the calculated tax. Schema Table: accounts Name Type Constraints Description id INT PRIMARY KEY The identifier of the account iban VARCHAR(255) The IBAN of the account Table: income Name Type Constraints Description account_id INT FOREIGN KEY (account_id => accounts.id) The account that received the income dt VARCHAR(19) The date and time of the income, text in the form YYYY-MM-DD HH:MM:SS amount DECIMAL(6,2) The income amount Required Output Return one row per account that has at least one income record in 2023, with exactly these columns in this order: Column Description iban The IBAN of th