<query id="getDocumentListWithinComment" action="select">
    <tables>
        <table name="documents" alias="documents" />
        <table name="comments" alias="comments" />
    </tables>
    <columns>
        <column name="documents.document_srl" />
        <column name="documents.list_order" />
    </columns>
    <conditions>
        <condition operation="in" column="documents.module_srl" var="module_srl" filter="number" />
        <condition operation="notin" column="documents.module_srl" var="exclude_module_srl" filter="number" pipe="and" />
        <condition operation="equal" column="documents.category_srl" var="category_srl" pipe="and" />
        <condition operation="equal" column="documents.document_srl" default="comments.document_srl" notnull="notnull" pipe="and" />
        <condition operation="equal" column="documents.member_srl" var="member_srl" filter="number" pipe="and" />
        <condition operation="in" column="documents.status" var="statusList" pipe="and" />
        <group pipe="and">
            <condition operation="more" column="documents.list_order" var="division" pipe="and" />
            <condition operation="below" column="documents.list_order" var="last_division" pipe="and" />
        </group>
        <condition operation="like" column="comments.content" var="s_comment" notnull="notnull" pipe="and" />
    </conditions>
    <navigation>
        <index var="sort_index" default="comments.list_order" order="asc" />
        <list_count var="list_count" default="20" />
        <page_count var="page_count" default="10" />
        <page var="page" default="1" />
    </navigation>
    <groups>
        <group column="documents.document_srl" />
    </groups>
</query>
