0
如何修改此查詢以使用存在?在SQL中使用EXIST
SELECT allele.allele as allele,site.allele_id as allele_id, site.genome_site_id as genome_site_id, popl.popl_id as popl_id,popl.frequency as frequency
FROM kref.allele as allele
join kref.genome_site_allele as site using (allele_id)
LEFT JOIN kref.genome_site_allele_popl as popl USING (ref_genome_id, allelism_start, allelism_end, chrom_id, allele_id)
WHERE ref_genome_id= 2 AND allelism_start=25710014 AND allelism_end=25710015
AND chrom_id ='22'
AND site.allele_id IN (
SELECT allele_id
from kref.allele
where allele IN ('-','C')
)
你能eleborate對什麼是你的目標只是爲了檢查,如果你得到任何結果或其他什麼東西? – Jester