title: Pass the values ​of the concatenated row to the where in clause
body: <p>When receiving products with subquery, I cannot pass a string with values ​​to where in because it is contained in one record in the database.</p>
  <p>Executing sql query</p>
  <pre class="lang-sql prettyprint-override"><code>    SELECT
          GROUP_CONCAT(id SEPARATOR ', ') AS id
      FROM
          (
          SELECT
              (
                  CASE WHEN products.type = 'configurable' AND products.parent_id IS NULL THEN(
                  SELECT
                      GROUP_CONCAT(subproducts.id SEPARATOR ',')
                  FROM
                      products AS subproducts
                  WHERE
                      parent_id = products.id
              ) WHEN products.type = 'configurable' AND products.parent_id IS NOT NULL THEN products.id ELSE products.parent_id
              END
      ) AS id
  FROM
      `products`
  LEFT JOIN `product_attribute_values` ON `products`.`id` = `product_attribute_values`.`product_id`
  WHERE
      `product_attribute_values`.`attribute_id` = '41' AND `text_value` = '68'
  ) AS `result`
  </code></pre>
  <p>I am getting the result</p>
  <p><a href="https://i.stack.imgur.com/vvxhU.png" rel="nofollow noreferrer">enter image description here</a></p>
  <p>How can I put the resulting result in the where in clause?</p>
  <p>Such a request only returns the first occurrence with the specified id to the comma</p>
  <p>I'm sorry for my English</p>
  <pre class="lang-sql prettyprint-override"><code>SELECT
     *
  FROM
     `products`#
  WHERE
      `products`.`id` IN(
      SELECT
          GROUP_CONCAT(id SEPARATOR ', ') AS id
      FROM
          (
          SELECT
              (
                  CASE WHEN products.type = 'configurable' AND products.parent_id IS NULL THEN(
                  SELECT
                      GROUP_CONCAT(subproducts.id SEPARATOR ',')
                  FROM
                      products AS subproducts
                  WHERE
                      parent_id = products.id
              ) WHEN products.type = 'configurable' AND products.parent_id IS NOT NULL THEN products.id ELSE products.parent_id
              END
      ) AS id
  FROM
      `products`
  LEFT JOIN `product_attribute_values` ON `products`.`id` = `product_attribute_values`.`product_id`
  WHERE
      `product_attribute_values`.`attribute_id` = '41' AND `text_value` = '68'
  ) AS `result`
  );
  </code></pre>