 	created_date,
 	discriminator
 )
-SELECT nc.nanoparticle_entity_pk_id,
+SELECT c.f_composition_pk_id,
 	c.f_composition_pk_id,
 	ca.created_by,
 	ca.created_date,
 	'Fullerene'
 FROM cananolab.fullerene_composition c,
-	cananolab.characterization ca,	
-	cananolab.nanoparticle_char nc
+	cananolab.characterization ca
 WHERE c.f_composition_pk_id = ca.characterization_pk_id
-and nc.characterization_pk_id = ca.characterization_pk_id
 ;
 
 insert into canano.composition

	created_date,
	discriminator
)
SELECT nc.nanoparticle_entity_pk_id,
	c.d_composition_pk_id,
	ca.created_by,
	ca.created_date,
	'Dendrimer'
FROM cananolab.dendrimer_composition c,
	cananolab.characterization ca,	
	cananolab.nanoparticle_char nc
WHERE c.d_composition_pk_id = ca.characterization_pk_id
and nc.characterization_pk_id = ca.characterization_pk_id
;

insert into canano.composition

	element_type,
	nanoparticle_entity_pk_id
)
SELECT ce.composing_element_pk_id,
	ce.element_type,
	ce.characterization_pk_id
FROM cananolab.composing_element ce,
	cananolab.characterization c
WHERE ce.characterization_pk_id = c.characterization_pk_id
AND c.discriminator != 'ComplexComp'
ORDER BY ce.composing_element_pk_id, ce.list_index
;
