i try to create a query (unsuccessfully for now) based on this SQL query :
SELECT CE . *
FROM CE
JOIN (
SELECT etudiant_id, periode_id, max( ce_version ) AS versionmax
FROM CE
GROUP BY etudiant_id, periode_id
)CEMAX ON CE.etudiant_id = CEMAX.etudiant_id
WHERE CE.periode_id = CEMAX.periode_id
AND CE.ce_version = CEMAX.versionmax
AND CE.etudiant_id = "1"
ORDER BY `CE`.`ce_version` DESC
if someone knows how to do, please tell me.
by advance, thanks
Ced.
--
View this message in context: http://www.nabble.com/Try-to-create-a-%22join%22-query-tp23316634p23316634.html
Sent from the Zend DB mailing list archive at Nabble.com.
没有评论:
发表评论