我们在此对基因表记录进行了比较:首先,将产生基因,并将之与所有基因进行比较,例如,a,ab,c, 那么,乙、乙、乙、乙、乙、乙、乙、乙、乙、乙、乙、乙、乙、.。
因此,对比结果是第二(b)项,因为对等记录是589 822项(b)项的普通基因术语,是1项,因为对记录586和所有其他组合而言,记录是零。
goterm gene auto
--------------------
589 a 1
822 a 2
478 a 3
586 b 4
589 b 5
600 c 6
586 c 7
822 b 8
学历:
select count(*),
x.gene,
x.ng
from (select t.gene,
v.gene as ng
from (select distinct gene
from gene) as t
cross join (select distinct gene from gene) as v) as x
left join (select (g.gene),(n.gene) as ng from gene g
join gene n on n.goterm=g.goterm where g.auto<n.auto ) as y on y.gene = x.ng
and y.ng = x.gene
group by x.gene,x.ng
最后,上述问题的结果是:
count gene gene
1 a a
2 b a
1 c a
1 a b
1 b b
1 c b
1 a c
1 b c
1 c c
但产出必须:
count gene gene
0 a a
2 b a
0 c a
0 a b
0 b b
1 c b
0 a c
0 b c
0 c c