Q: SQL Query to select one set when there are multiple entries I asked this question (SQL Query to select one set when there are duplicates) last year and got the solution to count the SLAs. Basically, count the number of minimum SLA for each application.  However, I have a follow-up question. I want a query that will return the rows of the minimum SLA and earliest date for each REF_ID (or APP_ID)    
 
ID |  REF_ID  | APP_ID  | FIRST_DATE | SECOND_DTE  |  SLA  |  
1  | 11       | 101     | 2016/10/01 | 2016/10/02  |  1    |
2  | 12       | 102     | 2016/10/01 | 2016/10/04  |  2    |
3  | 12       | 102     | 2016/10/01 | 2016/10/05  |  2    |

So the query should return the first and second row.
I would very much appreciate if someone could provide a solution.     
I have updated the query based on User726720 answer. This does not return entire rows but sufficient data.        
SELECT REF_ID, MIN(SECOND_DTE), MIN(SLA) FROM TABLE WHERE FIRST_DTE > '2016-10-01' AND FIRST_DTE < '2016-11-01' GROUP BY REF_ID

A: This should do the job:   
    Select * from table 
    WHERE SLA =  ( SELECT MIN(SLA) FROM table) 
    and SECOND_DTE = ( SELECT MIN(SECOND_DTE ) FROM table)

