<?xml version="1.0" encoding="UTF-8"?>
<!--
    $Author: huangtianyang
    $Date: 2018/7/10 下午3:08
    $Revision: 1.0 
-->
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    COUNT (1) contract_count,
                    tlc.LOAN_CON_WFL_STATUS,
                    ROUND (
                        COUNT (1) / (
                            SELECT
                                COUNT (1)
                            FROM
                                TRE_LOAN_CONTRACT
                        ) * 100,
                        2
                    ) contract_percent,
                    (
                        SELECT
                            COUNT (1)
                        FROM
                            TRE_LOAN_CONTRACT
                    ) total_count
                FROM
                    TRE_LOAN_CONTRACT tlc
                GROUP BY
                    tlc.LOAN_CON_WFL_STATUS
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>