select min(sal)from table name where sal in(select distinct top 2 sal from table name order by sal desc) On Sun, Mar 6, 2011 at 11:50 PM, Cesar Perez Ramirez <[email protected]>wrote:
> Try this > Select Max(score) as Score from Grades where Score >(subquery > > On Sun, Mar 6, 2011 at 2:43 PM, Stephen Russell <[email protected]>wrote: > >> On Fri, Mar 4, 2011 at 9:39 AM, praveen singh <[email protected]> >> wrote: >> > how get second maxima in sql queries? >> -------------- >> >> You know how to select for the highest value? >> >> Select Score from Grades >> where Score > ( earlier select here ) >> >> Now if you have to remove a high and a low score and the person graded >> had multiple high scores 10,10,9,10,8 in their set what value do you >> consider the second? >> >> Stephen >> >> -- >> Stephen Russell >> >> Sr. Production Systems Programmer >> CIMSgts >> >> 901.246-0159 cell >> >> -- >> You received this message because you are subscribed to the Google >> Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML >> Web Services,.NET Remoting" group. >> To post to this group, send email to [email protected] >> To unsubscribe from this group, send email to >> [email protected] >> For more options, visit this group at >> http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en >> or visit the group website at http://megasolutions.net >> > > -- > You received this message because you are subscribed to the Google > Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML > Web Services,.NET Remoting" group. > To post to this group, send email to [email protected] > To unsubscribe from this group, send email to > [email protected] > For more options, visit this group at > http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en > or visit the group website at http://megasolutions.net > -- You received this message because you are subscribed to the Google Groups "DotNetDevelopment, VB.NET, C# .NET, ADO.NET, ASP.NET, XML, XML Web Services,.NET Remoting" group. To post to this group, send email to [email protected] To unsubscribe from this group, send email to [email protected] For more options, visit this group at http://groups.google.com/group/dotnetdevelopment?hl=en?hl=en or visit the group website at http://megasolutions.net
