SelectWithUnionQuery (children 2)
 ExpressionList (children 1)
  SelectQuery (children 5)
   ExpressionList (children 2)
    Function sum (alias total) (children 1)
     ExpressionList (children 1)
      Identifier total_count
    Identifier domain
   TablesInSelectQuery (children 1)
    TablesInSelectQueryElement (children 1)
     TableExpression (children 1)
      Subquery (children 1)
       SelectWithUnionQuery (children 1)
        ExpressionList (children 2)
         SelectQuery (children 3)
          ExpressionList (children 3)
           Function COUNT (alias total_count) (children 1)
            ExpressionList (children 1)
             Asterisk
           Function SUM (alias facebookHits) (children 1)
            ExpressionList (children 1)
             Function if (children 1)
              ExpressionList (children 3)
               Function equals (children 1)
                ExpressionList (children 2)
                 Identifier domain
                 Literal \'facebook.com\'
               Literal UInt64_1
               Literal UInt64_0
           Identifier domain
          TablesInSelectQuery (children 1)
           TablesInSelectQueryElement (children 1)
            TableExpression (children 1)
             TableIdentifier clicks
          ExpressionList (children 1)
           Identifier domain
         SelectQuery (children 3)
          ExpressionList (children 3)
           Function COUNT (alias total_count) (children 1)
            ExpressionList (children 1)
             Asterisk
           Function toUInt64 (alias facebookHits) (children 1)
            ExpressionList (children 1)
             Literal UInt64_0
           Identifier domain
          TablesInSelectQuery (children 1)
           TablesInSelectQueryElement (children 1)
            TableExpression (children 1)
             TableIdentifier transactions
          ExpressionList (children 1)
           Identifier domain
   ExpressionList (children 1)
    Identifier domain
   ExpressionList (children 1)
    OrderByElement (children 1)
     Identifier domain
   Literal UInt64_10
 Identifier JSONEachRow
