<query id="getDocumentListWithExtraVarsPage" action="select">
    <tables>
        <table name="documents" />
        <table name="document_extra_vars" alias="extra_vars" />
    </tables>
    <columns>
        <column name="count(distinct documents.document_srl)" alias="count" />
    </columns>
    <conditions>
        <condition operation="in" column="documents.module_srl" var="module_srl" filter="number" />
        <condition operation="in" column="documents.category_srl" var="category_srl" filter="number" pipe="and" />
        <condition operation="in" column="documents.member_srl" var="member_srl" filter="number" pipe="and" />
        <condition operation="equal" column="extra_vars.module_srl" default="documents.module_srl" pipe="and" />
        <condition operation="equal" column="extra_vars.document_srl" default="documents.document_srl" pipe="and" />
        <condition operation="equal" column="extra_vars.var_idx" var="var_idx" notnull="notnull" pipe="and" />
		<condition operation="equal" column="documents.is_notice" var="s_is_notice" pipe="and" />
        <condition operation="in" column="documents.status" var="statusList" pipe="and" />
        <condition operation="like" column="extra_vars.value" var="var_value" notnull="notnull" pipe="and" />
		<group pipe="and">
			<condition operation="less" column="documents.list_order" var="list_order" filter="number" pipe="and" />
			<condition operation="more" column="documents.list_order" var="rev_list_order" filter="number" pipe="and" />
			<condition operation="less" column="documents.update_order" var="update_order" filter="number" pipe="and" />
			<condition operation="more" column="documents.update_order" var="rev_update_order" filter="number" pipe="and" />
			<condition operation="less" column="documents.regdate" var="rev_regdate" filter="number" pipe="and" />
			<condition operation="more" column="documents.regdate" var="regdate" filter="number" pipe="and" />
		</group>
    </conditions>
</query>
