select avg(salary) over(partition by department) = 65000
from employees where department = 'Engineering' limit 1
selectavg(salary) over(partition by department) = 65000from employees where department = 'Engineering' limit 1
select row_number() over(partition by department order by name) = 2
from employees where name = 'David' limit 1
select row_number() over(partition by department orderby name) = 2from employees where name = 'David' limit 1
select rank() over(partition by department order by salary desc) = 1
from employees where name = 'Eve' limit 1
select rank() over(partition by department orderby salary desc) = 1from employees where name = 'Eve' limit 1
select first_value(salary) over(partition by department order by salary desc) = 70000
from employees where department = 'Engineering' limit 1
select first_value(salary) over(partition by department orderby salary desc) = 70000from employees where department = 'Engineering' limit 1
select percent_rank() over(partition by department order by salary) = 0
from employees where name = 'Charlie' limit 1
select percent_rank() over(partition by department orderby salary) = 0from employees where name = 'Charlie' limit 1
select ntile(4) over(partition by department order by salary) = 2
from employees where name = 'Bob' limit 1
select ntile(4) over(partition by department orderby salary) = 2from employees where name = 'Bob' limit 1
select cume_dist() over(partition by department order by salary) = 1
from employees where name = 'Alice' limit 1
select cume_dist() over(partition by department orderby salary) = 1from employees where name = 'Alice' limit 1
select last_value(salary) over(partition by department order by salary range between unbounded preceding and unbounded following) = 50000
from employees where department = 'HR' limit 1
select last_value(salary) over(partition by department orderby salary range between unbounded preceding and unbounded following) = 50000from employees where department = 'HR' limit 1
select sum(salary) over(partition by department) = 105000
from employees where department = 'HR' limit 1
selectsum(salary) over(partition by department) = 105000from employees where department = 'HR' limit 1