由于本人并未对oracle数据库进行深入了解,但是工作中又需要知道一些基础的sql,所以记录下操作的sql语句。方便日后查看
1.将序列号作为分组查询的条件,再将查询出来的结果进行筛选。
select t.serial_number,count(t.serial_number) from stamp_info t group by t.serial_number
select t.serial_number,count(t.serial_number) from stamp_info t group by t.serial_number having count(t.serial_number) > ;