def nested_alias_escape(query, alias_name)
      sql_query = Arel::Nodes::Grouping.new(to_arel_sql(query))
      Arel::Nodes::As.new(sql_query, to_arel_sql(double_quote(alias_name)))
    end
def nested_alias_escape(query, alias_name)
      sql_query = Arel::Nodes::Grouping.new(to_arel_sql(query))
      Arel::Nodes::As.new(sql_query, to_arel_sql(double_quote(alias_name)))
    end
Applies aliases to the given query
 Ex: `SELECT * FROM users` => `(SELECT * FROM users) AS "members"`