postgresql7.1
select
o.pretty_name,
m.content_type
from
acs_object_types o, cr_folder_type_map m
where
m.folder_id = :folder_id
and
m.content_type = o.object_type
and
content_item__is_subclass(o.object_type, 'content_revision') = 't'
order by
case when o.object_type = 'content_revision' then '----' else o.pretty_name end