さて、私には 4 つのテーブルがあり、最初の 2 つを結合してから、他の 2 つのテーブルとの別のユニオンとの内部結合を行う必要があります。行き詰まっています。とにかくありがとう
SELECT miRNA, Gene_Symbol FROM
(SELECT cons.miRNA, cons.Gene_Symbol
FROM conserved_site_context_scores cons
WHERE cons.miRNA = 'hsa-miR-29c'
UNION
SELECT noncons.miRNA , noncons.Gene_Symbol
FROM nonconserved_site_context_scores noncons
WHERE noncons.miRNA = 'hsa-miR-29c'
) AS targetScan
SELECT mirna_name, gene_symbol FROM (
SELECT sc.mirna_name, sc.gene_symbol
FROM hg19_predictions_s_c_aug2010 sc
WHERE sc.mirna_name = 'hsa-miR-29c'
UNION
SELECT oc.mirna_name, oc.gene_symbol
FROM hg19_predictions_0_c_aug2010 oc
WHERE oc.mirna_name ='hsa-miR-29c'
) AS microRNA
INNER JOIN microRNA
ON targetScan.miRNA = microRNA.mirna_name
WHERE targetScan.miRNA = 'hsa-miR-29c';