Re: Finding the max value in a SECOND column

From: Jerry Stuckle <jstucklex_at_attglobal.net>
Date: Fri, 2 Jun 2017 10:56:56 -0400
Message-ID: <ogru4m$cvu$1_at_jstuckle.eternal-september.org>


On 6/2/2017 9:29 AM, bit-naughty_at_hotmail.com wrote:
> On Friday, June 2, 2017 at 1:14:07 AM UTC+5:30, Axel Schwenke wrote:
>
>> By using GROUP BY and the MAX() aggregate function. Buy a text book on SQL.
>
> Already have one. Can you be a bit clearer - how would I do the MAX on the SECOND col, for a particular value of the 1st?
> SELECT MAX(col2) FROM table WHERE col1=1 ? Something like that?
>

Did you try it?

> What would the GROUP BY be for?
>

If you're selecting multiple values for col1.

As Axel said - by a text book on SQL. These are very basic statements you shouldn't have to ask about.

-- 
==================
Remove the "x" from my email address
Jerry Stuckle
jstucklex_at_attglobal.net
==================
Received on Fri Jun 02 2017 - 16:56:56 CEST

Original text of this message