1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19
| SELECT D.urldossier,D.fact_retrocommission,D.fact_commission_banque,D.fact_commission_nette,I.projet_nat,I.projet_log, D.idAPP, D.idNOT, D.idRECOCL, D.cp,D.email,D.etude, D.suivi, D.etude_A, D.suivi_A, D.traitement, D.idCLIENT, D.internet_date_A, D.internet, D.date, D.datemodif, D.dateA, D.supp, D.ope_dossier, D.log, D.endet_av, D.fact_montant_final, G.idGEST, U.idUT, D.frmd_mt, rav_av, pro_select_1, pro_select_2, pro_select_3, pro_endetap_1, pro_restavap_1, pro_nombanque_1, pro_endetap_2, pro_restavap_2, pro_nombanque_2, pro_endetap_3, pro_restavap_3, pro_nombanque_3, D.nom_e, D.prenom_e, D.nom_c, D.prenom_c, D.tel, D.port, D.note_etoile, I.txz_dept, I.immo_frais_courtage FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.fact_montant_final) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.frmd_mt) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.immo_frais_courtage) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.fact_retrocommission) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.fact_commission_nette) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc
SELECT SUM(D.fact_commission_banque) as com FROM `extratest_dem` D, `extratest_dem_gestion` G, `extratest_utilisateur` U, `extratest_dem_pro` P, `extratest_dem_immo` I where P.idCLIENT=D.idCLIENT and D.idCLIENT=G.idCLIENT and G.idGEST=U.idUT and I.idCLIENT=D.idCLIENT and (D.etude<>'d_e_refus' and D.etude<>'d_c_abandon' and D.etude<>'d_b_abandon' and D.suivi<>'d_b_refus' and D.suivi<>'d_b_termine') and D.nom_e LIKE '%' and (D.date>'1554069600' or D.datemodif>'1554069600') and U.idUT='2' and D.supp='0' group by D.idCLIENT order by D.idCLIENT desc |
Partager