If you are using some alternative SQL dialect without common table expression syntax, you can use correlated sub-query as the one in the following example:
SELECT * FROM
ROW_NUMBER() OVER( PARTITION BY Company.CompanyId
ORDER BY Employee.DateHired desc)
INNER JOIN Employee
ON Employee.CompanyId = Company.CompanyId
WHERE order_index IN ( 1,2)
In this query, I have selected items in the sub-query with
. Then, in the outer query I have selected only those rows with
Started as a young scientist - winning the highest national awards in mathematics, physics, electrotechnics, and electronics.
Graduated from Faculty of Electrical Engineering, Department of Computer Techniques and Informatics, University of Belgrade, Serbia, as a first in the class, as a Master of Software Sciences.
Currently working in Gowi
as a Software engineer, architect, and project manager since 2004 - mostly using Microsoft technologies (ASP.NET, C#). Member of JQuery community - created few popular plugins (four popular JQuery DataTables add-ins and loadJSON template engine).
Interests: Software engineering process(estimation and standardization), mobile and business intelligence platforms.