补推荐客户

1.mobile 导出cstguid

SELECT * from cst_mob a where a.mobile in (SELECT DISTINCT wcode from 21xian);
SELECT * from backup_cst where MobileTel in (
'18730552756',
'15031571716',
'13191743328')

 

2.cstguid 导出客户

SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_141 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_142 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_143 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_144 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_145 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_146 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_147 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_148 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_149 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_150 a where CstGUID in 
(SELECT `code` FROM `21xian`)union all
SELECT CstName, Gender, BirthDate,  Language,   CstType,    CardType,   CardID, MobileTel,
OfficeTel,  HomeTel,    Fax,    Email,  PostCode,   Address,    Nationality,    NativePlace,  
SrcType,    LastModifyTime, OriGUID,    CreditEvaluate, CstCode,    Company,    Position,   Incoming, 
CompanyTel, Race,   Religion,   Political,  IsMerried,  LastTouchTime,  RecentTouch,    LastAssignTime,
RecentAssign,   LastAppointTime,    RecentAppoint,
cogniChannel,   Status, MemGUID,    StaffGUID,  OwnerGUID,  level,  CstGUID
from cst_Customer_151 a where CstGUID in 
(SELECT `code` FROM `21xian`)
View Code

3.cstguid 导出推荐

SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_141 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_142 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_143 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_144 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_145 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_146 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_147 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_148 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_149 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_150 a where  CstGUID in (SELECT DISTINCT code from 21xian ) union all
SELECT FROM_UNIXTIME(RecommTime),FROM_UNIXTIME(AppointTime),FROM_UNIXTIME(expireTime),a.* from prm_Agent_Cst_Recommed_151 a where  CstGUID in (SELECT DISTINCT code from 21xian ) ;
View Code

 

posted @ 2016-06-20 14:35  侠之大者kamil  阅读(124)  评论(0)    收藏  举报