string(806) "SELECT *,
(SELECT count(DISTINCT epls_usms) from epoll_answer where epls_ukey = eplm_ukey and epls_usms is not null) as respons_su,
(SELECT max(edoc_ukey) FROM edoc_master where edoc_attach_poll_id = eplm_ukey and edoc_attach_poll_id is not null and edoc_attach_poll_id != '') as f_attach
from epoll_master
where eplm_mbid = '' and eplm_gubn = '2' and eplm_ukey in (select dp from (SELECT wr_poll dp FROM eletter.sms5_write where wr_id = '' and wr_poll is not null) dpoll union select dp from (SELECT edoc_attach_poll_id dp FROM eletter.edoc_master where edoc_ukey in (SELECT wr_udoc FROM eletter.sms5_write where wr_id = '' and wr_udoc is not null)and edoc_attach_poll_id is not null) epoll)
order by eplm_ukey desc
LIMIT 0, 10 "