select distinct a.c1,a.c2, a.c3, a.c4, a.c5
from
(select * from 表 ) a,
(select * from 表 ) b
where
a.c2=b.c2 and a.c3<>b.c3
and a.c4=b.c4 and a.c5<>b.c5
select * from tablename a
where exists
(select 1 from tablename b where a.c2 = b.c2 and a.c4 = b.c4
having count(distinct c2) = 1 and count(distinct c2) = 1 and count(distinct c3) > 1 and count(distinct c5) > 1
)