Search Postgresql Archives
Re: select problem
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
(SELECT * from mydata,city WHERE mydata.sample = 1 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
INTERSECT
(SELECT * from mydata,city WHERE mydata.sample = 2 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
EXCEPT
(
(SELECT * from mydata,city WHERE mydata.sample = 2 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
INTERSECT
(SELECT * from mydata,city WHERE mydata.sample = 3 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
)
UNION
(SELECT * from mydata,city WHERE mydata.sample = 1 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
INTERSECT
(SELECT * from mydata,cit
y WHERE mydata.sample = 3 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
EXCEPT
(
(SELECT * from mydata,city WHERE mydata.sample = 2 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
INTERSECT
(SELECT * from mydata,city WHERE mydata.sample = 3 AND
mydata.age_from >= city.age_from AND mydata.age_to <= city.age_to AND
basen not in ('A', 'T', 'G','C'))
)
ps:
Here is set 1, 2, 3.
our target: (set 1 INTERSECT set 2) EXCEPT (set 2 INTERSECT set 3) UNION (set 1 INTERSECT set 3) EXCEPT (set 2 INTERSECT set 3).
your data is not correct.
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]
[Postgresql Jobs]
[Postgresql Admin]
[Postgresql Performance]
[Linux Clusters]
[PHP Home]
[PHP on Windows]
[Kernel Newbies]
[PHP Classes]
[PHP Books]
[PHP Databases]
[Postgresql & PHP]
[Yosemite]