《交叉查重后台导出的sql语句》由会员分享,可在线阅读,更多相关《交叉查重后台导出的sql语句(2页珍藏版)》请在金锄头文库上搜索。
1、交叉查重后台导出的sql语句-1、查询需要导出的数据表的结构select * from chk_rpt_queue where table_id is nullselect * from chk_cross_rpt_relation where queue_id = select * from tables where code = or code = select * from columns c,tables t where t.id = c.table_id and t.code = select * from columns c,tables t where t.id = c.tabl
2、e_id and t.code = -2、拼装导出数据的sql(注:这个sql就是最终的要导出数据用的sql)select distinct a.Team0000 分组号, table 表名, a.id 标识, a.ccmp0000 相似度, a.ParentID 对比标识,b.COL_0001,b.COL_0002,b.COL_0003,b.COL_0004,b.COL_0005,b.COL_0006 ,null as a0 ,null as a1 ,null as a2 ,null as a3 ,null as a4 from T_Repeat_ as a join as b on a.i
3、d = b.id union select distinct a.Team0000 分组号, table1 表名, a.ParentID 标识, 100 相似度, a.ParentID 对比标识,c.COL_0001 ,null ,null ,null ,null ,null,c.COL_0002,c.COL_0003,c.COL_0004,c.COL_0005,c.COL_0006 from T_Repeat_ as a join as c on a.ParentID = c.id order by a.Team0000 asc, ccmp0000 ascselect a.team0000,a.ccmp0000,c.COL_0001,c.col_0002, b.COL_0002, b.col_0001,b.col_0003 from T_Repeat_1251950083161 a, T_0000000014 b, T_0000000015 cwhere a.id = b.id and a.ParentID = c.id order by a.team0000, ccmp0000 desc