Select max of one date after getting max of other date -
i using oracle's psquery tool not have access actual code. generate list of students maximum dropped course . however, if student has more 1 dropped course on same max date, want return 1 max deadline date. so, max drop dates duplicates narrowed down further max deadline date.
select s.studentid, s.name, max(s.date), (s.deadlinedate), max(d.droppedcourse) droppedcourse student s join deadlinedate d on s.studentid = d.studentid group s.studentid, s.name, s.date having max(d.deadlinedate);
Comments
Post a Comment