SELECT
this_.studentid AS studenti1_26_0_,
this_.name AS name2_26_0_,
this_.address_city AS address_3_26_0_,
this_.address_state AS address_4_26_0_,
this_.preferredcoursecode AS preferre5_26_0_
FROM
student AS this_
WHERE
EXISTS(
SELECT
enrolment_.studentid AS y0_
FROM
enrolment AS enrolment_
WHERE
enrolment_.year
= (
SELECT
max(maxstudentenrolment_.year) AS y0_
FROM
enrolment AS maxstudentenrolment_
WHERE
this_.preferredcoursecode = maxstudentenrolment_.coursecode
)
);