Mariellelis
Programmer
Hi!
First, excuse me, my english is not good at all.
So I try to explain :
I have 2 tables : "person" and "stay".
For one person, we can have one or more stay.
I want to select all the person and their last stay and I don't know how to do it.
I tried like that :
"select nom,numstay, placestay
from person,stay
where person.numperson=stay.numperson
group by person.numperson
having max(numstay);"
But I have no result.
So how can I do?
Thanks in advance for your help!
First, excuse me, my english is not good at all.
So I try to explain :
I have 2 tables : "person" and "stay".
For one person, we can have one or more stay.
I want to select all the person and their last stay and I don't know how to do it.
I tried like that :
"select nom,numstay, placestay
from person,stay
where person.numperson=stay.numperson
group by person.numperson
having max(numstay);"
But I have no result.
So how can I do?
Thanks in advance for your help!