================================================================================
Query from select
================================================================================

var x = from a in source select a.B() ? c : c * 2;

var x = from a in source select somevar = a;

var x = from a in source select new { Name = a.B };

var x = from a in source
  where a.B == "A"
  select new { Name = a.B };

var x = from a in source
  orderby a.A descending
  orderby a.C ascending
  orderby 1
  select a;

var x = from a in source
  let z = new { a.A, a.B }
  select z;

var x = from a in sourceA
  join b in sourceB on a.FK equals b.PK
  select new { A.A, B.B };

var x = from a in sourceA
  from b in sourceB
  where a.FK == b.FK
  select new { A.A, B.B };

var x = from a in sourceA
  group a by a.Country into g
  select new { Country = g.Key, Population = g.Sum(p => p.Population) };


--------------------------------------------------------------------------------

(compilation_unit
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (select_clause
              (conditional_expression
                condition: (invocation_expression
                  function: (member_access_expression
                    expression: (identifier)
                    name: (identifier))
                  arguments: (argument_list))
                consequence: (identifier)
                alternative: (binary_expression
                  left: (identifier)
                  right: (integer_literal)))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (select_clause
              (assignment_expression
                left: (identifier)
                right: (identifier))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (select_clause
              (anonymous_object_creation_expression
                (identifier)
                (member_access_expression
                  expression: (identifier)
                  name: (identifier)))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (where_clause
              (binary_expression
                left: (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                right: (string_literal
                  (string_literal_content))))
            (select_clause
              (anonymous_object_creation_expression
                (identifier)
                (member_access_expression
                  expression: (identifier)
                  name: (identifier)))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (order_by_clause
              (member_access_expression
                expression: (identifier)
                name: (identifier)))
            (order_by_clause
              (member_access_expression
                expression: (identifier)
                name: (identifier)))
            (order_by_clause
              (integer_literal))
            (select_clause
              (identifier)))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (let_clause
              (identifier)
              (anonymous_object_creation_expression
                (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                (member_access_expression
                  expression: (identifier)
                  name: (identifier))))
            (select_clause
              (identifier)))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (join_clause
              (identifier)
              (identifier)
              (member_access_expression
                expression: (identifier)
                name: (identifier))
              (member_access_expression
                expression: (identifier)
                name: (identifier)))
            (select_clause
              (anonymous_object_creation_expression
                (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                (member_access_expression
                  expression: (identifier)
                  name: (identifier)))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (from_clause
              name: (identifier)
              (identifier))
            (where_clause
              (binary_expression
                left: (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                right: (member_access_expression
                  expression: (identifier)
                  name: (identifier))))
            (select_clause
              (anonymous_object_creation_expression
                (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                (member_access_expression
                  expression: (identifier)
                  name: (identifier)))))))))
  (global_statement
    (local_declaration_statement
      (variable_declaration
        type: (implicit_type)
        (variable_declarator
          name: (identifier)
          (query_expression
            (from_clause
              name: (identifier)
              (identifier))
            (group_clause
              (identifier)
              (member_access_expression
                expression: (identifier)
                name: (identifier)))
            (identifier)
            (select_clause
              (anonymous_object_creation_expression
                (identifier)
                (member_access_expression
                  expression: (identifier)
                  name: (identifier))
                (identifier)
                (invocation_expression
                  function: (member_access_expression
                    expression: (identifier)
                    name: (identifier))
                  arguments: (argument_list
                    (argument
                      (lambda_expression
                        parameters: (implicit_parameter)
                        body: (member_access_expression
                          expression: (identifier)
                          name: (identifier))))))))))))))
