Gross Pay With Tax
Medium
Payroll Calculations
Gross = base + overtime pay (as above). Tax is 10% of gross. Return name, gross and net pay (gross - tax) rounded to 2 decimals, ordered by name.
Table schema
Employees(id INT PRIMARY KEY, name VARCHAR(10), base INT, hours_worked INT, dept VARCHAR(5))Sample data
id | name | base | hours_worked | dept
1 | Ann | 3000 | 170 | IT
2 | Bob | 2500 | 200 | IT
3 | Cy | 2000 | 160 | HR
4 | Dee | 4000 | 150 | HR
Discussion
No discussions yet.
Shalyam Support
Hi! Ask us anything — we'll reply on WhatsApp or Telegram within 24 hours.