Hi,
Can anybody help me out with this query? Given the table below, I want to find the Surname of the youngest person called John:
I can almost get there using this:
which selects the correct row, but I can't work out how to get it to give me the surname field.
Many Thanks,
K.
Can anybody help me out with this query? Given the table below, I want to find the Surname of the youngest person called John:
Code:
forename | surname | dob
---------------------------------------
John | Smith | 01/05/1970
Mary | Brun | 23/11/1974
Frank | Smith | 05/05/1983
John | Jones | 12/08/1967
I can almost get there using this:
Code:
select distinct(forename), max(dob)
from people
WHERE
forename = 'John'
GROUP BY forename
which selects the correct row, but I can't work out how to get it to give me the surname field.
Many Thanks,
K.