<query id="isExistsSiteDomain" action="select">
    <tables>
        <table name="sites" />
    </tables>
    <columns>
        <column name="count(*)" alias="count" />
    </columns>
    <conditions>
        <condition operation="equal" column="domain" var="domain" notnull="notnull" />
    </conditions>
</query>
