For the java project, when querying sql, why does the following code prompt "missing closing parenthesis"?

<select id="select_label" resultMap="XykLabelRecords" 
    parameterClass="java.util.HashMap">
    <![CDATA[select * from (select * from xyk_label_records  where customer_number=-sharpcustomer_number-sharp  and is_stick =1]]>
    union all
    select * from xyk_label_records  where customer_number=-sharpcustomer_number-sharp  and is_stick =0
    <dynamic prepend=" and ">
        <isNotEmpty prepend=" and  " property="small">
            <![CDATA[create_time > -sharpsmall-sharp]]>
        </isNotEmpty>
        <isNotEmpty prepend=" and  " property="large">
            <![CDATA[create_time < -sharplarge-sharp]]>
        </isNotEmpty>
    </dynamic>
    )  a order by   a.is_stick desc,a.create_time desc 
</select>

<select id="select_label_count" resultClass="java.lang.String"
    parameterClass="java.util.HashMap">
    
<![CDATA[select  count(*) as count     from(select * from (select * from xyk_label_records  where customer_number=-sharpcustomer_number-sharp  and is_stick =1]]>
    union all
    select * from xyk_label_records  where customer_number=-sharpcustomer_number-sharp  and is_stick =0
    <dynamic prepend=" and ">
        <isNotEmpty prepend=" and  " property="small">
            <![CDATA[create_time > -sharpsmall-sharp]]>
        </isNotEmpty>
        <isNotEmpty prepend=" and  " property="large">
            <![CDATA[create_time < -sharplarge-sharp]]>
        </isNotEmpty>
    </dynamic>
    )  a order by   a.is_stick desc,a.create_time desc 
</select>
May.13,2021


is indeed missing a closing parenthesis

from (select from (select from. ) An order by a.is_stick desc,a.create_time desc

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b36f9d-2c06f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b36f9d-2c06f.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?