?
Current Path : /home1/savoy/ |
Linux gator3171.hostgator.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64 |
Current File : /home1/savoy/.mysql_history |
CREATE TABLE savoy_sibs.customer_summary_report_temp ( premium double, customer_id int(11), qrefdate date, insurance_company_id int(11) , received_premium double, qref varchar(30), policy_fees double, payment_method varchar(30), endorsementmode varchar(50), last_update_time datetime ) ENGINE=InnoDB DEFAULT CHARSET=utf8; CREATE TABLE savoy_sibs.customer_summary_report_temp ( premium double, customer_id int(11), qrefdate date, insurance_company_id int(11) , received_premium double, qref varchar(30), policy_fees double, payment_method varchar(30), endorsementmode varchar(50), last_update_time datetime ) ENGINE=InnoDB DEFAULT CHARSET=utf8; desc savoy_sibs.customer_summary_report_temp ; delete from savoy_sibs.customer_summary_report_temp; insert into table savoy_sibs.customer_summary_report_temp as SELECT p.premium ,plc.customer_id as customer_id ,p.fromdate as qrefdate ,p.insurance_company_id , SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium ,plc.quotation_ref as qref ,p.policy_fees , p.payment_method ,'' as endorsementmode ,sysdate() as last_update_time from placing_slip plc join placing_slip_premiumdetails p on p.placing_slip_id=plc.id left join policynote pn on pn.quotation_ref=plc.quotation_ref join covers c on c.id=plc.cover_id INNER JOIN country ct ON plc.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'issue' GROUP BY plc.id UNION SELECT plc.premiumchange as premium, pl.customer_id as customer_id, plc.enddate as qrefdate, p.insurance_company_id, SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium, plc.endrefno as qref, plc.policyfeeschange as policy_fees, plc.paymentoptions as payment_method , plc.mode as endorsementmode, sysdate() as last_update_time from placing_slip pl left join placing_slip_premiumdetails p on p.placing_slip_id=pl.id left join policynote pn on pn.quotation_ref=pl.quotation_ref join endorsement plc on plc.policyid=pn.id left join covers on covers.id=pl.cover_id INNER JOIN country ct ON pl.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'endorsement' GROUP BY plc.id; insert into table savoy_sibs.customer_summary_report_temp as SELECT p.premium ,plc.customer_id as customer_id ,p.fromdate as qrefdate ,p.insurance_company_id , SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium ,plc.quotation_ref as qref ,p.policy_fees , p.payment_method ,'' as endorsementmode ,sysdate() as last_update_time from placing_slip plc join placing_slip_premiumdetails p on p.placing_slip_id=plc.id left join policynote pn on pn.quotation_ref=plc.quotation_ref join covers c on c.id=plc.cover_id INNER JOIN country ct ON plc.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'issue' GROUP BY plc.id UNION SELECT plc.premiumchange as premium, pl.customer_id as customer_id, plc.enddate as qrefdate, p.insurance_company_id, SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium, plc.endrefno as qref, plc.policyfeeschange as policy_fees, plc.paymentoptions as payment_method , plc.mode as endorsementmode, sysdate() as last_update_time from placing_slip pl left join placing_slip_premiumdetails p on p.placing_slip_id=pl.id left join policynote pn on pn.quotation_ref=pl.quotation_ref join endorsement plc on plc.policyid=pn.id left join covers on covers.id=pl.cover_id INNER JOIN country ct ON pl.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'endorsement' GROUP BY plc.id; insert into savoy_sibs.customer_summary_report_temp SELECT p.premium ,plc.customer_id as customer_id ,p.fromdate as qrefdate ,p.insurance_company_id , SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium ,plc.quotation_ref as qref ,p.policy_fees , p.payment_method ,'' as endorsementmode ,sysdate() as last_update_time from placing_slip plc join placing_slip_premiumdetails p on p.placing_slip_id=plc.id left join policynote pn on pn.quotation_ref=plc.quotation_ref join covers c on c.id=plc.cover_id INNER JOIN country ct ON plc.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'issue' GROUP BY plc.id UNION SELECT plc.premiumchange as premium, pl.customer_id as customer_id, plc.enddate as qrefdate, p.insurance_company_id, SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium, plc.endrefno as qref, plc.policyfeeschange as policy_fees, plc.paymentoptions as payment_method , plc.mode as endorsementmode, sysdate() as last_update_time from placing_slip pl left join placing_slip_premiumdetails p on p.placing_slip_id=pl.id left join policynote pn on pn.quotation_ref=pl.quotation_ref join endorsement plc on plc.policyid=pn.id left join covers on covers.id=pl.cover_id INNER JOIN country ct ON pl.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'endorsement' GROUP BY plc.id; insert into savoy_sibs.customer_summary_report_temp SELECT p.premium ,plc.customer_id as customer_id ,p.fromdate as qrefdate ,p.insurance_company_id , SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium ,plc.quotation_ref as qref ,p.policy_fees , p.payment_method ,'' as endorsementmode ,sysdate() as last_update_time from placing_slip plc join placing_slip_premiumdetails p on p.placing_slip_id=plc.id left join policynote pn on pn.quotation_ref=plc.quotation_ref join covers c on c.id=plc.cover_id INNER JOIN country ct ON plc.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'issue' GROUP BY plc.id UNION SELECT plc.premiumchange as premium, pl.customer_id as customer_id, plc.enddate as qrefdate, p.insurance_company_id, SUM(customer_receipt_allocation.cr_allocation_amount) as received_premium, plc.endrefno as qref, plc.policyfeeschange as policy_fees, plc.paymentoptions as payment_method , plc.mode as endorsementmode, sysdate() as last_update_time from placing_slip pl left join placing_slip_premiumdetails p on p.placing_slip_id=pl.id left join policynote pn on pn.quotation_ref=pl.quotation_ref join endorsement plc on plc.policyid=pn.id left join covers on covers.id=pl.cover_id INNER JOIN country ct ON pl.currencytype = ct.id INNER JOIN insurance_company ON insurance_company.id = insurance_company_id LEFT JOIN customer_receipt_allocation on cr_allocation_pid=plc.id AND cr_allocation_type = 'endorsement' GROUP BY plc.id; / select count(*) from placing_slip; ! desc broking_slip ; show table status ; SELECT @@innodb_default_row_format;