select content_type from cr_items i, cr_revisions r
where r.item_id = i.item_id
and r.revision_id = :revision_id
$attribute_name
select $what from ${table_name}x where revision_id = :revision_id
insert into $last_table (
[join $columns ", "]
) values (
[join $values ", "]
)"
insert into $last_table (
[join $columns ", "]
) values (
[join $values ", "]
)"