group by 函数的使用
 select a.product_code, a.oper_id
      from t_product_trajectory a
    /*   where a.product_code = '123'
         and a.oper_id = '22'*/
     group by a.product_code, a.oper_id
    having count(a.product_code) > 1 and count(a.oper_id) > 1
select * from t_product_trajectory 这张表是没有主键的。

 
                    
                     
                    
                 
                    
                 
                
            
         
 
         浙公网安备 33010602011771号
浙公网安备 33010602011771号