Window Function Ide
Window Function Ide
Medium
+10 APs
solved
Write an SQL query to report for each player and date, how many games played so far
by the player.
That is, the total number of games played by the player until that date. Check the
example for clarity.
Write an SQL query to find the salaries of the employees after applying taxes.
Round the salary to the nearest integer.
Table: Salaries
The tax rate is calculated for each company based on the following criteria:
0% If the max salary of any employee in the company is less than $1000.
24% If the max salary of any employee in the company is in the range [1000, 10000]
inclusive.
49% If the max salary of any employee in the company is greater than $10000.
Return the result table in any order.
Input:
Table: Orders