Query Show 50% Rows of a table
WITH employee_ranking AS ( SELECT employee_id, last_name, first_name, salary, NTILE(2) OVER (ORDER BY salary ) as ntile FROM employee)SELECT employee_id, last_name, first_name, salaryFROM employee_rankingWHERE ntile = 1ORDER BY salary
No comments :
Post a Comment