Last news with extra parameter

This example shows the last news of your site. The news messages are all on the news test page. This is also a collaboration system. In the news test page there is an extra parameter used for myDate to set a date for the news message. In this example we need to filter for different revisions.

SELECT
content,
userDefined1 as myDate
FROM
Post,
asset
WHERE
asset.assetId=Post.assetId
AND
asset.parentId='NiuVFntXzhDrCHXO3E-Z9g'
AND
Post.revisionDate = (SELECT MAX(revisionDate) FROM Post WHERE Post.assetId=asset.assetId)
ORDER BY
userDefined1 desc
LIMIT 3

content myDate
This is the 3rd message Body. 13 September 2006
This is the first news message Body. 12 September 2006
This is the second news message body. 11 September 2006