Array
(
    [where] =>  AND wp_posts.post_type = 'plays' AND (wp_posts.post_status = 'publish') AND t.language_code='lt' AND pm.meta_value >= CURDATE() AND
                    NOT EXISTS (SELECT * FROM wp_taxonomymeta tm, wp_term_relationships at, wp_term_taxonomy tt
                    WHERE at.object_id = e.id AND tt.term_taxonomy_id = at.term_taxonomy_id AND tt.term_id =  tm.taxonomy_id AND tm.meta_key = 'abroad' AND tm.meta_value = '1')
    [groupby] => 
    [join] =>   JOIN wp_icl_translations t ON wp_posts.ID = t.element_id
                        AND t.element_type = 'post_plays' JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 JOIN wp_icl_translations tm ON t.trid = tm.trid AND tm.element_type = 'post_plays' AND tm.language_code = 'lt'
                    JOIN wp_postmeta em ON tm.element_id = em.meta_value AND em.meta_key = '_event_play'
                    JOIN wp_posts e ON em.post_id = e.ID AND e.post_status = 'publish'
                    JOIN wp_postmeta pm ON pm.post_id = e.ID AND pm.meta_key = '_event_event_date'
    [orderby] => (select min(convert(pm2.meta_value, date)) from wp_postmeta pm1, wp_postmeta pm2, wp_posts p1 
                        where pm1.meta_value = wp_posts.ID and pm1.meta_key = '_event_play' and pm2.post_id = pm1.post_id 
                          and pm2.meta_key = '_event_event_date' and p1.ID = pm2.post_id and p1.post_status = 'publish' and pm2.meta_value >= CURDATE()
                          AND NOT EXISTS (SELECT * FROM wp_taxonomymeta tm, wp_term_relationships at, wp_term_taxonomy tt
                    WHERE at.object_id = p1.id AND tt.term_taxonomy_id = at.term_taxonomy_id AND tt.term_id =  tm.taxonomy_id AND tm.meta_key = 'abroad' AND tm.meta_value = '1')) ASC 
    [distinct] => DISTINCT
    [fields] => wp_posts.*
    [limits] => 
)
SELECT  DISTINCT wp_posts.* FROM wp_posts   JOIN wp_icl_translations t ON wp_posts.ID = t.element_id
                        AND t.element_type = 'post_plays' JOIN wp_icl_languages l ON t.language_code=l.code AND l.active=1 JOIN wp_icl_translations tm ON t.trid = tm.trid AND tm.element_type = 'post_plays' AND tm.language_code = 'lt'
                    JOIN wp_postmeta em ON tm.element_id = em.meta_value AND em.meta_key = '_event_play'
                    JOIN wp_posts e ON em.post_id = e.ID AND e.post_status = 'publish'
                    JOIN wp_postmeta pm ON pm.post_id = e.ID AND pm.meta_key = '_event_event_date' WHERE 1=1  AND wp_posts.post_type = 'plays' AND (wp_posts.post_status = 'publish') AND t.language_code='lt' AND pm.meta_value >= CURDATE() AND
                    NOT EXISTS (SELECT * FROM wp_taxonomymeta tm, wp_term_relationships at, wp_term_taxonomy tt
                    WHERE at.object_id = e.id AND tt.term_taxonomy_id = at.term_taxonomy_id AND tt.term_id =  tm.taxonomy_id AND tm.meta_key = 'abroad' AND tm.meta_value = '1')  ORDER BY (select min(convert(pm2.meta_value, date)) from wp_postmeta pm1, wp_postmeta pm2, wp_posts p1 
                        where pm1.meta_value = wp_posts.ID and pm1.meta_key = '_event_play' and pm2.post_id = pm1.post_id 
                          and pm2.meta_key = '_event_event_date' and p1.ID = pm2.post_id and p1.post_status = 'publish' and pm2.meta_value >= CURDATE()
                          AND NOT EXISTS (SELECT * FROM wp_taxonomymeta tm, wp_term_relationships at, wp_term_taxonomy tt
                    WHERE at.object_id = p1.id AND tt.term_taxonomy_id = at.term_taxonomy_id AND tt.term_id =  tm.taxonomy_id AND tm.meta_key = 'abroad' AND tm.meta_value = '1')) ASC