Company: DocuSign_6april
Difficulty: medium
Problem Description A development team is working on a financial application designed to simplify tax calculations. One of the key features is an automated tax calculation mechanism that computes a fixed 20% tax on the total income for each account in the system for the year 2023. Write a SQL query to calculate the total income and the corresponding 20% tax for each account based on their income entries in 2023. Schema The database schema consists of two tables: accounts and income . accounts Column Name Data Type Constraints Description id INT PRIMARY KEY The unique identifier of the account. iban VARCHAR(255) The International Bank Account Number (IBAN) of the account. income Column Name Data Type Constraints Description account_id INT FOREIGN KEY References id in the accounts table. dt VARCHAR(19) The date and time of the income entry, formatted as YYYY-MM-DD HH:MM:SS . amount DECIMAL(6,2) The income amount received. Required Output The query should return a list of accounts with th