i.live_revision is not null
i.live_revision is null
creation_date > current_timestamp - interval '1' day
creation_date > current_timestamp - interval '7' day
creation_date > current_timestamp - interval '30' day
select g.comment_id,
r.title,
i.live_revision is not null as live_version_p,
i.live_revision is not null and
i.live_revision = r.revision_id as approved_p,
o.creation_date
from general_comments g,
cr_items i,
cr_revisions r,
acs_objects o
where g.comment_id = i.item_id and
r.revision_id = o.object_id and
r.revision_id = i.latest_revision and
o.creation_user = :user_id
[ad_dimensional_sql $dimensional]
[template::list::orderby_clause -orderby -name comments_list]