データベース内の複数のフィールドが同じ行を検出


最初のテーブルにはプライマリ・キーボードが設定されていませんでしたが、その後、複数のフィールドをプライマリ・キーとして設定しますが、これらのフィールドの値は重複しています.
だから重複する行を見つけなければなりません.
          :c_year,c_parent,c_name
--      
select *
  from t_qq9_gdp t
 where
 rowid != (select max(rowid)
             from t_qq9_gdp t2
            where t.c_year = t2.c_year
              and t.c_parent = t2.c_parent
              and t.c_name = t2.c_name);
--                    
select *
  from t_qq9_gdp t
 where t.c_year = '2002'
   and t.c_parent = '           '
   and (t.c_name = '       ' or t.c_name = '    ');

select c_nme,count(*) as aa from tb_user_info t
group by c_nme,c_pwd,c_enabled
order by aa desc

注意group byはorder byではありません