<?xml version="1.0" encoding="UTF-8"?>
<bm:model xmlns:bm="http://www.leaf-framework.org/schema/bm">
    <bm:operations>
        <bm:operation name="query">
            <bm:query-sql><![CDATA[
                SELECT
                    *
                FROM
                    (SELECT
                        t.contract_id,
                        TO_CHAR(SUM(NVL(t.price, 0)), 'FM999,999,999,999.00') sum_price,
                        TO_CHAR(SUM(NVL(t.original_asset_value, 0)), 'FM999,999,999,999.00') sum_value
                    FROM
                        con_contract_lease_item_lv t
                    GROUP BY
                        t.contract_id
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
</bm:model>
