I have the following query:
SELECT *
FROM empno,
ename,
deptno,
sal,
job,
MIN(sal) OVER (PARTITION BY deptno, job) AS min_sal_by_dept_and_job
FROM emp;
With this result: Query result
I want the column min_sal_by_dept_and_job to exclude X percent of the sal column. Let's say 50% so in this case the first two rows with sal 1250 and 1250 will be excluded and min_sal_by_dept_and_job will no longer be 1250 but 1500 because it is the min from 1500 and 1600. Simply said, I want the min() to be applied only on certain percentage of the rows.