select 1 from dual where exists (select 1 from application_groups where package_id = :package_id) select instance_name from apm_packages where package_id = :package_id select m.group_id as supersite_group_id, p.instance_name as supersite_name from application_groups m, apm_packages p, site_nodes s1, site_nodes s2 where s1.node_id = :node_id and s2.node_id = s1.parent_id and p.package_id = s2.object_id and m.package_id = :subsite_id select count(*) from site_nodes where parent_id = :node_id and name = :instance_name select pretty_name from acs_object_types where object_type = :object_type select host from host_node_map where node_id = :node_id $where_clause and host = :search_vhost select name, key from subsite_themes insert into subsite_themes (key, name, template, css, form_template, list_template, list_filter_template, dimensional_template resource_dir) values (:key, :name, :template, :css, :form_template, :list_template, :list_filter_template, :dimensional_template, :resource_dir) delete from subsite_themes where key = :key select * from subsite_themes where key = :theme select pretty_name, package_key from apm_package_types where implements_subsite_p = 't' order by pretty_name