select  
  subq_0.c1 as c0, 
  case when ((subq_0.c3 is not NULL) 
        or (((subq_0.c6 is not NULL) 
            and (EXISTS (
              select  
                  ref_1.v8 as c0, 
                  subq_0.c1 as c1, 
                  subq_0.c2 as c2, 
                  subq_0.c2 as c3, 
                  ref_1.v8 as c4, 
                  subq_0.c5 as c5
                from 
                  test.table26 as ref_1
                where 0))) 
          and ((((subq_0.c1 is NULL) 
                and ((subq_0.c1 is NULL) 
                  and (EXISTS (
                    select  
                        ref_2.v5 as c0, 
                        subq_0.c2 as c1, 
                        subq_0.c2 as c2, 
                        (select v3 from test.table8)
                           as c3
                      from 
                        test.table97 as ref_2
                      where subq_0.c5 is NULL)))) 
              and ((subq_0.c5 is not NULL) 
                or (((subq_0.c0 is NULL) 
                    or (subq_0.c2 is NULL)) 
                  and (subq_0.c3 is NULL)))) 
            and ((1) 
              or (((0) 
                  and (0)) 
                and (subq_0.c2 is NULL)))))) 
      or ((((((subq_0.c1 is NULL) 
                and (subq_0.c6 is NULL)) 
              or ((((EXISTS (
                      select  
                          ref_3.v93 as c0
                        from 
                          test.table78 as ref_3
                        where EXISTS (
                          select  
                              ref_3.v62 as c0
                            from 
                              test.table89 as ref_4
                            where (ref_4.v12 is not NULL) 
                              or ((ref_4.v8 is NULL) 
                                or (ref_3.v101 is NULL))))) 
                    and (1)) 
                  and ((0) 
                    and (EXISTS (
                      select  
                          ref_5.v8 as c0
                        from 
                          test.table26 as ref_5
                        where (((0) 
                              or ((EXISTS (
                                  select  
                                      ref_5.v5 as c0, 
                                      subq_0.c5 as c1, 
                                      ref_5.v1 as c2, 
                                      subq_0.c1 as c3
                                    from 
                                      test.table51 as ref_6
                                    where (EXISTS (
                                        select  
                                            ref_6.v21 as c0, 
                                            ref_7.v7 as c1, 
                                            ref_7.v0 as c2, 
                                            ref_5.v8 as c3, 
                                            64 as c4, 
                                            ref_7.v0 as c5
                                          from 
                                            test.table20 as ref_7
                                          where ref_5.v7 is NULL)) 
                                      and ((0) 
                                        or (((0) 
                                            or (1)) 
                                          or ((EXISTS (
                                              select  
                                                  subq_0.c1 as c0, 
                                                  14 as c1, 
                                                  (select v15 from test.table60)
                                                     as c2, 
                                                  (select v6 from test.table18)
                                                     as c3, 
                                                  75 as c4, 
                                                  ref_6.v102 as c5
                                                from 
                                                  test.table78 as ref_8
                                                where 0)) 
                                            or (1)))))) 
                                or (1))) 
                            and ((0) 
                              and (EXISTS (
                                select  
                                    ref_5.v6 as c0, 
                                    ref_5.v2 as c1, 
                                    ref_9.v1 as c2, 
                                    ref_5.v6 as c3, 
                                    subq_0.c6 as c4, 
                                    ref_9.v1 as c5, 
                                    ref_5.v2 as c6, 
                                    ref_9.v2 as c7, 
                                    subq_0.c0 as c8, 
                                    ref_5.v4 as c9
                                  from 
                                    test.table44 as ref_9
                                  where 0)))) 
                          or (subq_0.c5 is not NULL))))) 
                and (((EXISTS (
                      select  
                          (select v6 from test.table32)
                             as c0
                        from 
                          test.table60 as ref_10
                        where ref_10.v2 is NULL)) 
                    and ((subq_0.c2 is not NULL) 
                      and (((1) 
                          and (((1) 
                              or (1)) 
                            and (1))) 
                        or ((0) 
                          and ((((EXISTS (
                                  select  
                                      subq_0.c0 as c0, 
                                      (select v73 from test.table63)
                                         as c1, 
                                      subq_0.c0 as c2, 
                                      subq_0.c6 as c3, 
                                      ref_11.v21 as c4
                                    from 
                                      test.table71 as ref_11
                                    where (((0) 
                                          and (((1) 
                                              and (((1) 
                                                  or (1)) 
                                                or (1))) 
                                            and ((ref_11.v3 is not NULL) 
                                              and (1)))) 
                                        and ((select v85 from test.table69)
                                             is NULL)) 
                                      and (EXISTS (
                                        select  
                                            ref_12.v0 as c0, 
                                            subq_0.c0 as c1
                                          from 
                                            test.table14 as ref_12
                                          where 1)))) 
                                or (0)) 
                              or (((1) 
                                  and ((1) 
                                    or (1))) 
                                or (subq_0.c6 is not NULL))) 
                            and (EXISTS (
                              select  
                                  ref_13.v3 as c0, 
                                  (select v7 from test.table8)
                                     as c1, 
                                  ref_13.v1 as c2, 
                                  subq_0.c6 as c3, 
                                  ref_13.v2 as c4, 
                                  subq_0.c6 as c5
                                from 
                                  test.table24 as ref_13
                                where 0))))))) 
                  or (((EXISTS (
                        select  
                            subq_0.c6 as c0, 
                            subq_0.c4 as c1, 
                            subq_0.c0 as c2, 
                            ref_14.v27 as c3, 
                            subq_0.c2 as c4, 
                            subq_0.c3 as c5, 
                            ref_14.v42 as c6
                          from 
                            test.table53 as ref_14
                          where (EXISTS (
                              select  
                                  ref_15.v4 as c0, 
                                  60 as c1
                                from 
                                  test.table24 as ref_15
                                where (1) 
                                  or (34 is not NULL))) 
                            or (ref_14.v51 is not NULL))) 
                      or ((((1) 
                            and ((subq_0.c6 is NULL) 
                              and ((subq_0.c3 is NULL) 
                                or (subq_0.c0 is not NULL)))) 
                          and (1)) 
                        or (subq_0.c0 is NULL))) 
                    and (EXISTS (
                      select  
                          subq_0.c6 as c0, 
                          ref_16.v3 as c1, 
                          ref_16.v6 as c2, 
                          subq_0.c3 as c3, 
                          ref_16.v16 as c4
                        from 
                          test.table56 as ref_16
                        where (0) 
                          or (0))))))) 
            and (((subq_0.c6 is not NULL) 
                and (((0) 
                    and ((subq_0.c1 is NULL) 
                      and (((EXISTS (
                            select  
                                subq_0.c6 as c0, 
                                ref_17.v1 as c1, 
                                subq_0.c4 as c2, 
                                ref_17.v1 as c3, 
                                ref_17.v1 as c4, 
                                ref_17.v1 as c5, 
                                67 as c6, 
                                subq_0.c5 as c7
                              from 
                                test.table11 as ref_17
                              where 0)) 
                          and (((1) 
                              and (subq_0.c1 is not NULL)) 
                            or (0))) 
                        and (EXISTS (
                          select  
                              subq_0.c5 as c0, 
                              subq_0.c2 as c1, 
                              ref_18.v0 as c2, 
                              subq_0.c2 as c3
                            from 
                              test.table24 as ref_18
                            where 0))))) 
                  or (subq_0.c3 is NULL))) 
              and (1))) 
          and (((1) 
              or (EXISTS (
                select  
                    subq_0.c2 as c0, 
                    subq_0.c0 as c1
                  from 
                    test.table11 as ref_19
                  where subq_0.c2 is NULL))) 
            or (subq_0.c4 is NULL))) 
        or (1)) then subq_0.c2 else subq_0.c2 end
     as c1, 
  (select v6 from test.table22)
     as c2, 
  case when ((1) 
        and (((EXISTS (
              select  
                  ref_20.v4 as c0, 
                  ref_20.v15 as c1, 
                  ref_20.v14 as c2
                from 
                  test.table95 as ref_20
                where (EXISTS (
                    select  
                        ref_20.v11 as c0
                      from 
                        test.table26 as ref_21
                      where 1)) 
                  and (0))) 
            and ((subq_0.c4 is NULL) 
              or (EXISTS (
                select  
                    ref_22.v50 as c0, 
                    ref_22.v28 as c1, 
                    (select v6 from test.table8)
                       as c2, 
                    subq_0.c0 as c3, 
                    ref_22.v45 as c4
                  from 
                    test.table53 as ref_22
                  where ((1) 
                      and ((EXISTS (
                          select  
                              subq_0.c0 as c0, 
                              ref_23.v0 as c1, 
                              ref_22.v27 as c2, 
                              ref_23.v20 as c3, 
                              subq_0.c5 as c4
                            from 
                              test.table71 as ref_23
                            where ((EXISTS (
                                  select  
                                      (select v7 from test.table29)
                                         as c0, 
                                      ref_22.v9 as c1, 
                                      ref_23.v0 as c2, 
                                      ref_22.v1 as c3, 
                                      ref_23.v1 as c4
                                    from 
                                      test.table68 as ref_24
                                    where 1)) 
                                and (ref_22.v15 is not NULL)) 
                              and (0))) 
                        or (ref_22.v10 is NULL))) 
                    or ((EXISTS (
                        select  
                            ref_25.v3 as c0, 
                            subq_0.c2 as c1, 
                            subq_0.c0 as c2, 
                            ref_25.v0 as c3, 
                            ref_25.v3 as c4
                          from 
                            test.table44 as ref_25
                          where 0)) 
                      and (EXISTS (
                        select  
                            ref_26.v45 as c0, 
                            ref_22.v51 as c1, 
                            ref_22.v4 as c2, 
                            79 as c3, 
                            ref_26.v18 as c4, 
                            ref_26.v51 as c5, 
                            ref_22.v42 as c6, 
                            77 as c7, 
                            subq_0.c0 as c8, 
                            ref_26.v45 as c9
                          from 
                            test.table58 as ref_26
                          where ref_22.v49 is NULL))))))) 
          and ((((subq_0.c2 is NULL) 
                or (subq_0.c0 is NULL)) 
              or (subq_0.c5 is not NULL)) 
            or (subq_0.c0 is NULL)))) 
      and (EXISTS (
        select  
            ref_27.v0 as c0, 
            subq_0.c4 as c1
          from 
            test.table69 as ref_27
          where (((1) 
                or (subq_0.c2 is not NULL)) 
              and (0)) 
            and (EXISTS (
              select  
                  74 as c0, 
                  subq_0.c3 as c1, 
                  subq_0.c1 as c2, 
                  34 as c3, 
                  ref_28.v2 as c4
                from 
                  test.table44 as ref_28
                where 1)))) then subq_0.c6 else subq_0.c6 end
     as c3, 
  case when ((((EXISTS (
              select  
                  subq_0.c3 as c0, 
                  ref_29.v46 as c1, 
                  ref_29.v85 as c2, 
                  subq_0.c3 as c3, 
                  subq_0.c5 as c4
                from 
                  test.table51 as ref_29
                where 0)) 
            and (1)) 
          or (subq_0.c3 is not NULL)) 
        and (0)) 
      and ((1) 
        or ((EXISTS (
            select  
                10 as c0, 
                ref_30.v53 as c1, 
                subq_0.c5 as c2
              from 
                test.table78 as ref_30
              where ((1) 
                  or (1)) 
                or ((EXISTS (
                    select  
                        (select v5 from test.table95)
                           as c0, 
                        ref_31.v61 as c1, 
                        subq_0.c2 as c2, 
                        subq_0.c3 as c3, 
                        ref_30.v40 as c4
                      from 
                        test.table63 as ref_31
                      where (((EXISTS (
                              select  
                                  ref_31.v22 as c0, 
                                  ref_32.v20 as c1, 
                                  ref_31.v114 as c2, 
                                  ref_32.v56 as c3
                                from 
                                  test.table51 as ref_32
                                where 0)) 
                            and (0)) 
                          and ((1) 
                            or (EXISTS (
                              select  
                                  ref_31.v57 as c0
                                from 
                                  test.table95 as ref_33
                                where 0)))) 
                        and (40 is not NULL))) 
                  and (EXISTS (
                    select  
                        ref_30.v26 as c0, 
                        ref_34.v0 as c1, 
                        ref_30.v24 as c2, 
                        subq_0.c0 as c3
                      from 
                        test.table22 as ref_34
                      where subq_0.c2 is not NULL))))) 
          and (1))) then subq_0.c3 else subq_0.c3 end
     as c4, 
  39 as c5, 
  subq_0.c3 as c6, 
  (select v0 from test.table26)
     as c7, 
  subq_0.c6 as c8, 
  CURRENT_DATE() as c9, 
  subq_0.c6 as c10, 
  subq_0.c6 as c11, 
  subq_0.c4 as c12
from 
  (select  
        coalesce(ref_0.v0,
          ref_0.v3) as c0, 
        ref_0.v2 as c1, 
        39 as c2, 
        ref_0.v5 as c3, 
        65 as c4, 
        ref_0.v2 as c5, 
        (select v8 from test.table8)
           as c6
      from 
        test.table32 as ref_0
      where 0) as subq_0
where (0) 
  or (subq_0.c0 is NULL);