class_docstr: Simplify queries by eliminating sub-queries when possible by rewriting expressions.
  
   Expressions in the SELECT, GROUP BY, and WHERE are can be rewritten.
  
  e.g. from
  
  SELECT b.col0 AS foo
  FROM (
    SELECT SUM(a.col0) AS bar
    FROM table0 a
  ) b
  GROUP BY b.col0
  
  to
  
  SELECT SUM(a.col0) AS foo
  FROM table0 a
  GROUP BY foo
code: def __init__(
      self, use_column_alias_in_group_bys: bool = False
  ) -> None:  # noqa: D
      self._use_column_alias_in_group_bys = (
          use_column_alias_in_group_bys
      )
  
imports: from __future__ import annotations
  import logging
  from dataclasses import dataclass
  from typing import List, Optional, Sequence, Tuple
  from metricflow.sql.optimizer.sql_query_plan_optimizer import SqlQueryPlanOptimizer
  from metricflow.sql.sql_exprs import SqlColumnAliasReferenceExpression, SqlColumnReference, SqlColumnReplacements, SqlExpressionNode, SqlExpressionTreeLineage, SqlLogicalExpression, SqlLogicalOperator
  from metricflow.sql.sql_plan import SqlJoinDescription, SqlOrderByDescription, SqlQueryPlanNode, SqlQueryPlanNodeVisitor, SqlSelectColumn, SqlSelectQueryFromClauseNode, SqlSelectStatementNode, SqlTableFromClauseNode
label_desc: Use image node_id 1 to create a new SqlRewritingSubQueryReducer object from inherited base classes: SqlQueryPlanOptimizer with example: obj = SqlRewritingSubQueryReducer(use_column_alias_in_group_bys)