厦门美的维修点,小型洗衣粉生产设备,钱莹泳装
select a.* from tb_mend_enrol a,
(select a.typeid, a.address from tb_mend_enrol a
group by a.typeid, a.address
having count(a.typeid) >= 2 and count(a.address) >= 2 ) b
where a.typeid = b.typeid and a.address = b.address and a.reporter='测试'
and a.reptime >= to_date('2018-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss')
order by a.address, a.reptime
方法二:
select a.* from tb_mend_enrol a
where (select count(*) from tb_mend_enrol a1
where a1.typeid = a.typeid and a1.address=a.address)>1
and a.reporter='测试'
and a.reptime >= to_date('2018-08-01 00:00:00','yyyy-mm-dd hh24:mi:ss'
order by a.address
如对本文有疑问,请在下面进行留言讨论,广大热心网友会与你互动!! 点击进行留言回复
Oracle字符串函数length、upper、lower、initcap、 concat、instr、replace
网友评论