string(913) "select * from wp_terms t
inner join wp_term_taxonomy tx on tx.term_taxonomy_id=t.term_id and tx.taxonomy='onesystem_destination'
inner join (
select distinct rel.term_taxonomy_id from wp_posts p
inner join wp_term_relationships rel on rel.object_id=p.ID and p.post_status='publish'
inner join wp_term_taxonomy tx on tx.term_taxonomy_id=rel.term_taxonomy_id
) posts on posts.term_taxonomy_id=t.term_id # exists(select countrywpid from onesystem_packagecountry_temp where t.term_id in (countrywpid,citywpid,operationwpid))
#inner join onesystem_itemcontract i on i.ID=posts.term_taxonomy_id and i.keytype='T'
inner join wp_termmeta tm on tm.term_id=t.term_id and tm.meta_key='onesystemweb-plugin_objecttype' and tm.meta_value='region' where tx.parent=22611 and exists(select countrywpid from onesystem_packagecountry_temp where tx.term_id in (countrywpid,citywpid,operationwpid)) order by t.name"
string(67) "Table 'www_ponte_rs_v9.onesystem_packagecountry_temp' doesn't exist"