<query id="getTagList" action="select">
    <tables>
        <table name="tags" alias="T" />
        <table name="documents" alias="D" />
    </tables>
    <columns>
        <column name="tag" />
        <column name="count(*)" alias="count" />
    </columns>
    <conditions>
        <condition operation="equal" column="T.document_srl" default="D.document_srl" />
        <condition operation="notequal" column="D.module_srl" default="0" pipe="and" />
        <condition operation="in" column="T.module_srl" var="module_srl" pipe="and" />
    </conditions>
    <navigation>
        <index var="sort_index" default="count" order="order_type" order-default="desc" />
		<index var="count" order="desc" comment="For backward compatibility only" />
        <list_count var="list_count" default="20" />
    </navigation>
    <groups>
        <group column="tag" />
    </groups>
</query>
