Thread: questions from begener
08-20-12, 05:35 #1Registered User
- Join Date
- Aug 2012
Unanswered: questions from begener
Hello little girls and wise boys!
I've just finished my first degree studies and starded carier in analysis in Bank, in Poland. I don't have much practice in creatin SQL queries so I would like to ask here some elementary questions. I will be grateful if ya will help me to solve the problemos.
Can ya tell me how to choose only one record, with maximum date. I wrote this:
from tabela as a
where a.date= (select max(date)
from tabela as b
where a.ID = b.ID)
but this doesn't work
also doesn't work
where rownum <2
I work in SAS Guide, in proc SQL
08-20-12, 10:17 #2Registered User
Provided Answers: 1Code:
- Join Date
- Aug 2003
- Where the Surf Meets the Turf @Del Mar, CA
SELECT employee_id FROM employees WHERE hire_date = (SELECT Max(hire_date) FROM employees) AND rownum = 1;You can lead some folks to knowledge, but you can not make them think.
The average person thinks he's above average!
For most folks, they don't know, what they don't know.
Good judgement comes from experience. Experience comes from bad judgement.