Hi there,
I need to write a query that will get me the earliest date for the given conditions.
But this query does not give me the earliest date if there are multiple dates for the same criteria.
It also does not return the data if there is only one row (one date) for another applicant. If I do max(session_date) this row is returned.
Any ideas?
Thanks
Jino
I need to write a query that will get me the earliest date for the given conditions.
Code:
select i.session_date
from information_session i
where i.session_date = (select min(session_date)from information_session ,
case_applicant_info_sess
where case_applicant_info_sess.information_session_id = information_session.information_session_id
and information_session.information_session_id = i.information_session_id)
But this query does not give me the earliest date if there are multiple dates for the same criteria.
It also does not return the data if there is only one row (one date) for another applicant. If I do max(session_date) this row is returned.
Any ideas?
Thanks
Jino