Top "Top-n" questions

Oracle Analytic function for min value in grouping

I'm new to working with analytic functions. DEPT EMP SALARY ---- ----- ------ 10 MARY 100000 10 JOHN 200000 10 SCOTT 300000 20 BOB 100000 20 BETTY 200000 30 ALAN 100000 30 TOM 200000 30 …

sql oracle analytic-functions top-n
top 1 case in select statement on TSQL

I am having problem on this query. How can I fix this: select (select case top 1 STATUS when 'Inprocess' then …

sql tsql case top-n
SQL Query to Select the 'Next' record (similar to First or Top N)

I need to do a query to return the next (or prev) record if a certain record is not present. …

sql database select top-n
Spark sql top n per group

How can I get the top-n (lets say top 10 or top 3) per group in spark-sql? http://www.xaprb.com/blog/2006/12/07/…

apache-spark group-by apache-spark-sql top-n
Selecting top n elements of a group in Oracle

I have an Oracle table which has a name,value,time columns.Basically the table is for logging purposes to …

sql oracle rank top-n
How to produce rank in Oracle

Need to rank the below by salary, with highest salary having rank 1. The RANK column shown is what I'm after: …

sql oracle oracle10g analytic-functions top-n
NHibernate select top N with condition on children using fetch

I have simple User entity: public class User { public virtual int Id { get; set; } public virtual DateTime CreationDate { get; set; } …

sql-server linq nhibernate one-to-many top-n