Hello,
I've got problem (a little problem I suppose) and I hope, you'll help me. I use Sybase Anywhere and here's my code:
SELECT TOP 4 Person.Id_person, Person.Name, Person.Surname, Visit.Date, Visit.Place
From Person, Visit
WHERE Visit.Id_person = Person.Id_person
ORDER BY Visit.DATE DESC
and here's the result:
3 | Paul | McDonald | 2010-01-19 | Ohio
3 | Paul | McDonald | 2010-01-18 | New York
19 | Ted | Malicky | 2009-12-24 | Tokyo
12 | Meg | Newton | 2009-10-13 | Warsaw
and I would like not to duplicate Paul McDonald, and have only first (by the date) visit. I'd like to have result like this:
3 | Paul | McDonald | 2010-01-19 | Ohio
19 | Ted | Malicky | 2009-12-24 | Tokyo
12 | Meg | Newton | 2009-10-13 | Warsaw
....
What should I do? Could you help me? :(