Solve database duplication issues in the database

zhaozj2021-02-16  102

Solve the database Recording Dress (by: aloxy) JUL 22, 11: 19 - Product Data Repeat Statistics Select MC, UserId, Count (MC) AS Expr1From ChanpingROUP BY MC, UserID - Plug-in New Table New Table New Table New Table New * into # Tmp1 from chanpingoselect min (ID) as autoID into # Tmp2 from # Tmp1 group by mc, useridgoselect * into newchanpin from # Tmp1 where ID in (select autoID from # tmp2) - find duplicate user --select distinct name from user_nameselect * into # tmp0 from user_namegoselect min (ID) as autoID into # tmp6 from # tmp0 group by admingoselect * into newuser_name from # tmp0 where ID in (select autoID from # tmp6) - user-defined categories SELECT userlb AS Expr1, userid AS Expr2, COUNT (userlb) AS Expr3FROM newuser_lbGROUP bY userlb, useridselect * into # Tmp8 from user_lbgoselect min (ID) as autoID into # Tmp9 from # Tmp8 group by userlb, useridgoselect * into newuser_lb from # Tmp8 where ID in (select autoID from # TMP9) - User News Select BT, Userid, Count (bt) from user_news group by bt, useridselect * into # tmp88 from user_newsgoselect min (id) as autoid Into # TMP99 from # TMP88 Group BT, UserIdgoselect * INTO newuser_news from # TMP88 WHERE ID in (Select Autoid from # TMP99)

转载请注明原文地址:https://www.9cbs.com/read-14224.html

New Post(0)