All Downloads are FREE. Search and download functionalities are using the official Maven repository.

db.migration.v0.9.0.3__agr_curation_api.sql Maven / Gradle / Ivy

There is a newer version: v0.35.0
Show newest version
DELETE FROM diseaseannotation_conditionrelation
	WHERE diseaseannotation_id IN (
		SELECT id FROM diseaseannotation
			WHERE id NOT IN (SELECT id from genediseaseannotation)
				AND id NOT IN (SELECT id FROM allelediseaseannotation)
				AND id NOT IN (SELECT id FROM agmdiseaseannotation));
				
DELETE FROM diseaseannotation_ecoterm
	WHERE diseaseannotation_id IN (
		SELECT id FROM diseaseannotation
			WHERE id NOT IN (SELECT id from genediseaseannotation)
				AND id NOT IN (SELECT id FROM allelediseaseannotation)
				AND id NOT IN (SELECT id FROM agmdiseaseannotation));
				
DELETE FROM diseaseannotation_gene
	WHERE diseaseannotation_id IN (
		SELECT id FROM diseaseannotation
			WHERE id NOT IN (SELECT id from genediseaseannotation)
				AND id NOT IN (SELECT id FROM allelediseaseannotation)
				AND id NOT IN (SELECT id FROM agmdiseaseannotation));
				
DELETE FROM diseaseannotation_note
	WHERE diseaseannotation_id IN (
		SELECT id FROM diseaseannotation
			WHERE id NOT IN (SELECT id from genediseaseannotation)
				AND id NOT IN (SELECT id FROM allelediseaseannotation)
				AND id NOT IN (SELECT id FROM agmdiseaseannotation));
				
DELETE FROM diseaseannotation_vocabularyterm
	WHERE diseaseannotation_id IN (
		SELECT id FROM diseaseannotation
			WHERE id NOT IN (SELECT id from genediseaseannotation)
				AND id NOT IN (SELECT id FROM allelediseaseannotation)
				AND id NOT IN (SELECT id FROM agmdiseaseannotation));		
				
DELETE FROM diseaseannotation
	WHERE id NOT IN (SELECT id from genediseaseannotation)
		AND id NOT IN (SELECT id FROM allelediseaseannotation)
		AND id NOT IN (SELECT id FROM agmdiseaseannotation);
		
DELETE FROM association
	WHERE id NOT IN (SELECT id from genediseaseannotation)
		AND id NOT IN (SELECT id FROM allelediseaseannotation)
		AND id NOT IN (SELECT id FROM agmdiseaseannotation);
				
		




© 2015 - 2024 Weber Informatics LLC | Privacy Policy