If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
|
#1
|
|||
|
|||
min query
Hi,
How do I get the 2nd minimum value and the 3rd minimum from a table after I have done MIN query for the 1st minimum value? SELECT dbo_CON.SC, dbo_CON.SN, Min(dbo_CON.SQ) AS MinOfSQ FROM dbo_CON GROUP BY dbo_CON.SC, dbo_CON.SN HAVING (((dbo_CON.SC)49)); Thanks, |
#2
|
|||
|
|||
min query
SELECT TOP 3 dbo_CON.SC,
dbo_CON.SN, Min(dbo_CON.SQ) AS MinOfSQ FROM dbo_CON GROUP BY dbo_CON.SC, dbo_CON.SN HAVING dbo_CON.SC49 ORDER BY Min(dbo_CON.SQ) ; -- Jerry Whittle, Microsoft Access MVP Light. Strong. Cheap. Pick two. Keith Bontrager - Bicycle Builder. "Siew-Ming" wrote: Hi, How do I get the 2nd minimum value and the 3rd minimum from a table after I have done MIN query for the 1st minimum value? SELECT dbo_CON.SC, dbo_CON.SN, Min(dbo_CON.SQ) AS MinOfSQ FROM dbo_CON GROUP BY dbo_CON.SC, dbo_CON.SN HAVING (((dbo_CON.SC)49)); Thanks, |
Thread Tools | |
Display Modes | |
|
|