• Want to receive the latest contracting news and advice straight to your inbox? Sign up to the ContractorUK newsletter here. Every sign up will also be entered into a draw to WIN £100 Amazon vouchers!

SQL test

DimPrawn

Richer than sasguru
Thanks received
1,182
name age salary
---------- ---------- ----------
dan 23 67
bob 45 94
tom 24 94
sue 23 45
joe 45 51
sam 22 51


Write SQL to find the youngest person earning the highest salary.

The answer is tom aged 24 by the way.

Anyone?
 
1.30 before kick off? Anyway it might classify as work and I'm trying to go the whole day without doing any. So far so good and only 1 hour to go.
 
thinking about the football and putting off writing a vision/scope document...(WHY?).....this is gonna be even more painful on a friday
 
No one man enough for the task?

Typical contractors. I expect one the permies here eager to please will take up the challenge.....
 
zeitghost said:
I'm watching some removals men across the road.

It's hot & they're making me feel tired... :D

What kind of 'watching' are you doing. The kind where you touch yourself at the same time? Or are just interested in removalling (SIC).
 
DimPrawn said:
No one man enough for the task?

Typical contractors. I expect one the permies here eager to please will take up the challenge.....

I'm a manager, dear boy.... I'll set it as a task for one of my minions. I myself am occupied with higher matters, such as which pub to watch the footie in.
 
That's good, but the SQL engine has to do two sorts on the data and a top 1 to throw all the other rows away.

Any other ideas?
 

Advertisers

Back
Top