<?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
                        hes.exp_score_id,
                        hes.owner_user_id,
                        (SELECT su.description FROM sys_user su WHERE su.user_id = hes.owner_user_id
                        ) user_name,
                        hes.score_user_id,
                        (SELECT su.description FROM sys_user su WHERE su.user_id = hes.score_user_id
                        ) score_user_name,
                        hes.owner_user_desc,
                        hes.score_sum
                    FROM
                        hn_exp_score hes
                    WHERE
                        hes.score_year_id = ${@score_year_id} AND
                        hes.score_user_id = ${@score_user_id} AND
                        hes.submit_flag   = 'Y'
                    ) t1 #WHERE_CLAUSE#
            ]]></bm:query-sql>
        </bm:operation>
    </bm:operations>
    <bm:query-fields>
        <bm:query-field name="user_name" queryExpression="t1.user_name like &apos;%&apos;||${@user_name}||&apos;%&apos;"/>
        <bm:query-field name="score_user_name" queryExpression="t1.score_user_name like &apos;%&apos;||${@score_user_name}||&apos;%&apos;"/>
        <bm:query-field name="score_sum_from" queryExpression="t1.score_sum &gt;=${@score_sum_from}"/>
        <bm:query-field name="score_sum_to" queryExpression="t1.score_sum &lt;=${@score_sum_to}"/>
    </bm:query-fields>
</bm:model>
