What is the equivalent SQLite syntax for the Oracle SQL syntax below? row_number() OVER (PARTITION BY x ORDER BY y DESC, z) AS aField
Example... SELECT department_id, first_name, last_name, salary FROM ( SELECT department_id, first_name, last_name, salary, ROW_NUMBER() OVER (PARTITION BY department_id ORDER BY salary desc) rn FROM employees ) WHERE rn <= 3 ORDER BY department_id, salary DESC, last_name; http://docs.oracle.com/cd/E11882_01/server.112/e41084/functions156.htm#SQLRF06100 Thanks in advance, Richard This communication is the property of CenturyLink and may contain confidential or privileged information. Unauthorized use of this communication is strictly prohibited and may be unlawful. If you have received this communication in error, please immediately notify the sender by reply e-mail and destroy all copies of the communication and any attachments.