a:9:{s:10:"query_type";s:3:"sql";s:3:"sql";a:13:{s:11:"join_tables";a:3:{i:0;a:6:{s:3:"_id";i:536903;s:9:"collapsed";b:0;s:4:"type";s:9:"LEFT JOIN";s:5:"table";s:8:"postmeta";s:10:"on_current";s:7:"post_id";s:7:"on_base";s:2:"ID";}i:1;a:6:{s:3:"_id";i:193153;s:9:"collapsed";b:0;s:4:"type";s:10:"INNER JOIN";s:5:"table";s:22:"wc_product_meta_lookup";s:10:"on_current";s:10:"product_id";s:7:"on_base";s:2:"ID";}i:2;a:6:{s:3:"_id";i:343375;s:9:"collapsed";b:0;s:4:"type";s:9:"LEFT JOIN";s:5:"table";s:18:"term_relationships";s:10:"on_current";s:9:"object_id";s:7:"on_base";s:2:"ID";}}s:5:"where";a:0:{}s:7:"orderby";a:0:{}s:9:"calc_cols";a:0:{}s:13:"advanced_mode";b:1;s:12:"manual_query";s:2180:"SELECT
    CONCAT('/product/', parent.post_name, '/?', meta_attribute_value.meta_key, '=', meta_attribute_value.meta_value) AS permalink,
    variations.ID AS variation_id,
    meta_attribute_value.meta_key AS taxonomy_name,
    variations.post_excerpt AS attribute_name,
    variations.post_parent AS parent_id,
    parent.post_name AS parent_slug,
    parent.post_title AS parent_title,
    wp_postmeta3.meta_value AS featured_image,
    meta_regular_price.meta_value AS regular_price,
    meta_sale_price.meta_value AS sale_price,
    meta_attribute_value.meta_value AS attribute_pa_value
FROM
    wp_posts AS variations
    INNER JOIN wp_posts AS parent ON variations.post_parent = parent.ID
    LEFT JOIN wp_postmeta AS meta_regular_price ON variations.ID = meta_regular_price.post_id AND meta_regular_price.meta_key = '_regular_price'
    LEFT JOIN wp_postmeta AS meta_sale_price ON variations.ID = meta_sale_price.post_id AND meta_sale_price.meta_key = '_sale_price'
    LEFT JOIN wp_postmeta AS wp_postmeta3 ON parent.ID = wp_postmeta3.post_id AND wp_postmeta3.meta_key = '_thumbnail_id'
    INNER JOIN wp_term_relationships ON parent.ID = wp_term_relationships.object_id
    INNER JOIN wp_term_taxonomy ON wp_term_relationships.term_taxonomy_id = wp_term_taxonomy.term_taxonomy_id
    INNER JOIN wp_terms AS attribute_terms ON attribute_terms.term_id = wp_term_taxonomy.term_id
    INNER JOIN wp_term_relationships AS rel ON variations.post_parent = rel.object_id
    INNER JOIN wp_term_taxonomy AS tt ON rel.term_taxonomy_id = tt.term_taxonomy_id
    INNER JOIN wp_terms AS terms ON tt.term_id = terms.term_id
    INNER JOIN wp_term_relationships AS cat_rel ON parent.ID = cat_rel.object_id
    INNER JOIN wp_term_taxonomy AS cat_tt ON cat_rel.term_taxonomy_id = cat_tt.term_taxonomy_id
    INNER JOIN wp_terms AS cat_terms ON cat_tt.term_id = cat_terms.term_id
    LEFT JOIN wp_postmeta AS meta_attribute_value ON variations.ID = meta_attribute_value.post_id AND meta_attribute_value.meta_key LIKE 'attribute_pa_%'
WHERE
    variations.post_type = 'product_variation'
   AND cat_terms.term_id = '%current_id%'
GROUP BY
    variation_id
ORDER BY
   attribute_pa_value;

";s:5:"table";s:5:"posts";s:8:"use_join";s:0:"";s:13:"group_results";s:0:"";s:8:"group_by";s:8:"posts.ID";s:15:"include_columns";a:0:{}s:14:"cast_object_to";s:0:"";s:15:"default_columns";a:0:{}}s:13:"__dynamic_sql";a:2:{s:11:"join_tables";a:0:{}s:5:"where";a:0:{}}s:12:"show_preview";b:1;s:12:"preview_page";N;s:18:"preview_page_title";N;s:20:"preview_query_string";N;s:8:"query_id";N;s:11:"description";N;}