create table t_ykc ( 
c_l2i8lidec INTEGER ,
c_axh TEXT ,
c_xlfd1o TEXT ,
c_qs5uppjb TEXT NOT NULL,
c_v7 TEXT ,
c_z5h8od3 TEXT NOT NULL,
c_yjyf52_k TEXT NOT NULL,
c_fkfi3 TEXT ,
c_mtp6pw INTEGER ,
primary key(c_mtp6pw)
);

create table t_bbh ( 
c_erfnu INTEGER ,
c_u4ptduw2 INTEGER ,
c_a1k TEXT ,
c_g INTEGER ,
c_ig INTEGER ,
primary key(c_g),
unique(c_u4ptduw2)
);

select  
    subq_0.c0 as c0
  from 
    (select  
          (select c_l2i8lidec from t_ykc order by c_l2i8lidec limit 1 offset 4)
             as c0
        from 
          ((t_ykc as ref_0
              inner join t_ykc as ref_1
              on 1=1)
            cross join t_ykc as ref_62
            )
        where EXISTS (
          select  
              ref_63.c_xlfd1o as c0
            from 
              t_ykc as ref_63
            where EXISTS (
              select  
                  ref_64.c_l2i8lidec as c0, 
                  ref_64.c_fkfi3 as c1
                from 
                  t_ykc as ref_64
                where EXISTS (
                  select  
                      (select c_fkfi3 from t_ykc order by c_fkfi3 limit 1 offset 2)
                         as c0
                    from 
                      t_ykc as ref_65
                    where EXISTS (
                      select  
                          ref_66.c_l2i8lidec as c0, 
                          (select count(c_a1k) from t_bbh)
                             as c1
                        from 
                          t_ykc as ref_66
                        where EXISTS (
                          select  
                              ref_1.c_v7 as c0
                            from 
                              t_ykc as ref_67
                            where EXISTS (
                              select  
                                  ref_68.c_xlfd1o as c0, 
                                  ref_1.c_fkfi3 as c1, 
                                  ref_68.c_qs5uppjb as c2, 
                                  ref_66.c_v7 as c3, 
                                  ref_68.c_l2i8lidec as c4, 
                                  ref_65.c_fkfi3 as c5
                                from 
                                  t_ykc as ref_68
                                where EXISTS (
                                  select distinct 
                                      ref_0.c_qs5uppjb as c0, 
                                      ref_68.c_xlfd1o as c1, 
                                      ref_69.c_yjyf52_k as c2, 
                                      (select c_l2i8lidec from t_ykc order by c_l2i8lidec limit 1 offset 3)
                                         as c3
                                    from 
                                      t_ykc as ref_69
                                    where EXISTS (
                                      select  
                                          ref_70.c_qs5uppjb as c0, 
                                          ref_70.c_qs5uppjb as c1, 
                                          ref_67.c_axh as c2, 
                                          4 as c3, 
                                          ref_70.c_fkfi3 as c4, 
                                          ref_67.c_fkfi3 as c5
                                        from 
                                          t_ykc as ref_70
                                        where EXISTS (
                                          select  
                                              ref_71.c_z5h8od3 as c0, 
                                              ref_66.c_qs5uppjb as c1, 
                                              ref_71.c_axh as c2, 
                                              (select c_axh from t_ykc order by c_axh limit 1 offset 4)
                                                 as c3
                                            from 
                                              t_ykc as ref_71
                                            where EXISTS (
                                              select  
                                                  ref_62.c_xlfd1o as c0
                                                from 
                                                  t_ykc as ref_72
                                                where EXISTS (
                                                  select  
                                                      ref_68.c_xlfd1o as c0, 
                                                      ref_73.c_z5h8od3 as c1
                                                    from 
                                                      t_ykc as ref_73
                                                    where EXISTS (
                                                      select  
                                                          ref_74.c_l2i8lidec as c0, 
                                                          ref_74.c_yjyf52_k as c1, 
                                                          ref_65.c_l2i8lidec as c2
                                                        from 
                                                          t_ykc as ref_74
                                                        where EXISTS (
                                                          select  
                                                              ref_75.c_v7 as c0, 
                                                              ref_66.c_fkfi3 as c1, 
                                                              ref_75.c_l2i8lidec as c2, 
                                                              ref_1.c_xlfd1o as c3, 
                                                              ref_75.c_xlfd1o as c4, 
                                                              ref_75.c_v7 as c5, 
                                                              ref_75.c_xlfd1o as c6, 
                                                              ref_66.c_l2i8lidec as c7, 
                                                              ref_75.c_axh as c8, 
                                                              ref_69.c_xlfd1o as c9, 
                                                              ref_64.c_axh as c10
                                                            from 
                                                              t_ykc as ref_75
                                                            where EXISTS (
                                                              select distinct 
                                                                  ref_76.c_axh as c117
                                                                from 
                                                                  t_ykc as ref_76
                                                                where EXISTS (
                                                                  select  
                                                                      ref_68.c_xlfd1o as c0, 
                                                                      ref_0.c_z5h8od3 as c1, 
                                                                      ref_0.c_fkfi3 as c2, 
                                                                      ref_77.c_yjyf52_k as c3, 
                                                                      ref_77.c_qs5uppjb as c4
                                                                    from 
                                                                      t_ykc as ref_77
                                                                    where EXISTS (
                                                                      select  
                                                                          ref_78.c_z5h8od3 as c0, 
                                                                          47 as c1
                                                                        from 
                                                                          t_ykc as ref_78
                                                                        where EXISTS (
                                                                          select  
                                                                              ref_79.c_l2i8lidec as c0, 
                                                                              ref_79.c_l2i8lidec as c1
                                                                            from 
                                                                              t_ykc as ref_79
                                                                            where EXISTS (
                                                                              select  
                                                                                  ref_65.c_z5h8od3 as c0
                                                                                from 
                                                                                  t_ykc as ref_80
                                                                                where EXISTS (
                                                                                  select  
                                                                                      ref_65.c_z5h8od3 as c0
                                                                                    from 
                                                                                      t_ykc as ref_81
                                                                                    where EXISTS (
                                                                                      select  
                                                                                          ref_65.c_z5h8od3 as c0
                                                                                        from 
                                                                                          t_ykc as ref_82
                                                                                        where EXISTS (
                                                                                          select  
                                                                                              (select c_qs5uppjb from t_ykc order by c_qs5uppjb limit 1 offset 3)
                                                                                                 as c0, 
                                                                                              (select c_axh from t_ykc order by c_axh limit 1 offset 5)
                                                                                                 as c1, 
                                                                                              ref_83.c_axh as c2, 
                                                                                              ref_77.c_z5h8od3 as c3, 
                                                                                              ref_67.c_qs5uppjb as c4, 
                                                                                              ref_65.c_xlfd1o as c5, 
                                                                                              ref_67.c_v7 as c6, 
                                                                                              ref_0.c_xlfd1o as c7, 
                                                                                              ref_83.c_v7 as c8, 
                                                                                              ref_83.c_fkfi3 as c9, 
                                                                                              ref_80.c_v7 as c10, 
                                                                                              (select c_v7 from t_ykc order by c_v7 limit 1 offset 3)
                                                                                                 as c11, 
                                                                                              ref_71.c_qs5uppjb as c12, 
                                                                                              ref_71.c_qs5uppjb as c13, 
                                                                                              ref_71.c_qs5uppjb as c14, 
                                                                                              ref_71.c_qs5uppjb as c15, 
                                                                                              ref_71.c_qs5uppjb as c16, 
                                                                                              ref_71.c_qs5uppjb as c17, 
                                                                                              ref_71.c_qs5uppjb as c18, 
                                                                                              ref_71.c_qs5uppjb as c19, 
                                                                                              ref_71.c_qs5uppjb as c20, 
                                                                                              ref_83.c_xlfd1o as c21, 
                                                                                              ref_65.c_z5h8od3 as c22
                                                                                            from 
                                                                                              t_ykc as ref_83
                                                                                            where EXISTS (
                                                                                              select distinct 
                                                                                                  ref_84.c_yjyf52_k as c0, 
                                                                                                  ref_80.c_z5h8od3 as c1, 
                                                                                                  ref_62.c_z5h8od3 as c2, 
                                                                                                  ref_64.c_xlfd1o as c3, 
                                                                                                  ref_84.c_yjyf52_k as c4, 
                                                                                                  ref_69.c_axh as c5, 
                                                                                                  ref_84.c_xlfd1o as c6, 
                                                                                                  ref_84.c_axh as c7, 
                                                                                                  ref_84.c_z5h8od3 as c8, 
                                                                                                  ref_80.c_yjyf52_k as c9, 
                                                                                                  ref_84.c_xlfd1o as c10, 
                                                                                                  ref_67.c_xlfd1o as c11, 
                                                                                                  ref_64.c_fkfi3 as c12, 
                                                                                                  ref_1.c_qs5uppjb as c13, 
                                                                                                  ref_84.c_yjyf52_k as c14, 
                                                                                                  ref_81.c_yjyf52_k as c15
                                                                                                from 
                                                                                                  t_ykc as ref_84
                                                                                                where EXISTS (
                                                                                                  select  
                                                                                                      ref_85.c_fkfi3 as c0, 
                                                                                                      ref_85.c_z5h8od3 as c1, 
                                                                                                      ref_85.c_axh as c2, 
                                                                                                      ref_81.c_axh as c3
                                                                                                    from 
                                                                                                      t_ykc as ref_85
                                                                                                    where EXISTS (
                                                                                                      select  
                                                                                                          ref_86.c_axh as c0, 
                                                                                                          ref_86.c_v7 as c1, 
                                                                                                          ref_67.c_axh as c2, 
                                                                                                          ref_70.c_fkfi3 as c3, 
                                                                                                          ref_65.c_xlfd1o as c4, 
                                                                                                          68 as c5, 
                                                                                                          ref_86.c_fkfi3 as c6
                                                                                                        from 
                                                                                                          t_ykc as ref_86
                                                                                                        where EXISTS (
                                                                                                          select  
                                                                                                              ref_87.c_z5h8od3 as c0, 
                                                                                                              ref_84.c_fkfi3 as c1, 
                                                                                                              ref_87.c_xlfd1o as c2, 
                                                                                                              ref_87.c_v7 as c3, 
                                                                                                              37 as c4, 
                                                                                                              ref_87.c_qs5uppjb as c5, 
                                                                                                              ref_1.c_v7 as c6, 
                                                                                                              ref_77.c_axh as c7, 
                                                                                                              ref_0.c_l2i8lidec as c8, 
                                                                                                              ref_62.c_fkfi3 as c9, 
                                                                                                              ref_71.c_z5h8od3 as c10
                                                                                                            from 
                                                                                                              t_ykc as ref_87
                                                                                                            where 1=1 AND 1=1 AND 0<>0 AND 0<>0 AND 0<>0 AND 1=1 AND 1=1 AND 0<>0 AND 1=1 AND 1=1 AND 1=1 AND ref_77.c_l2i8lidec between ref_75.c_mtp6pw and ref_84.c_l2i8lidec AND ref_77.c_l2i8lidec in (
                                                                                                                        select  
                                                                                                                              ref_88.c_l2i8lidec as c0
                                                                                                                            from 
                                                                                                                              t_ykc as ref_88
                                                                                                                            where ref_88.c_v7 like 'tdn%2jqzf' AND ref_88.c_yjyf52_k not like 'xum%1ury'
                                                                                                                          union
                                                                                                                          select  
                                                                                                                              ref_89.c_l2i8lidec as c0
                                                                                                                            from 
                                                                                                                              t_ykc as ref_89
                                                                                                                            where 0<>0
                                                                                                                            window hownbqs as ( partition by ref_89.c_l2i8lidec order by ref_89.c_axh desc)) AND ref_1.c_mtp6pw <= ref_85.c_l2i8lidec AND 1=1 AND ((1=1) 
                                                                                                                    or (ref_82.c_mtp6pw < (select c_erfnu from t_bbh order by c_erfnu limit 1 offset 1)
                                                                                                                        )) 
                                                                                                                  or (0<>0) AND (ref_69.c_mtp6pw = ref_65.c_mtp6pw) 
                                                                                                                or (1=1)
                                                                                                            order by c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10 desc)
                                                                                                        order by c0, c1, c2, c3, c4, c5, c6 asc)
                                                                                                    order by c0, c1, c2, c3 asc) limit 105)
                                                                                            order by c0, c1, c2, c3, c4, c5, c6, c7, c8, c9, c10, c11, c12, c13, c14, c15, c16, c17, c18, c19, c20, c21, c22 desc limit 196) limit 196)
                                                                                    order by c0 desc limit 196)
                                                                                order by c0 asc limit 82)
                                                                            window qh34 as ( partition by ref_72.c_z5h8od3,ref_0.c_l2i8lidec order by (select c_l2i8lidec from t_ykc order by c_l2i8lidec limit 1 offset 2)
                                                                                 desc) limit 134) limit 22))
                                                                window dh as ( partition by ref_74.c_axh,ref_71.c_l2i8lidec order by ref_67.c_l2i8lidec,ref_68.c_qs5uppjb desc))
                                                            window xfqv as ( partition by ref_71.c_fkfi3 order by ref_72.c_qs5uppjb desc) limit 157))
                                                    order by c0, c1 asc)
                                                order by c0 desc)))
                                    order by c0, c1, c2, -c3 desc)
                                order by c0, c1, c2, c3, c4, c5 asc)) limit 135))
                order by c0, c1 asc)) limit 142) as subq_0
  where (0<>0) 
    or (EXISTS (
      select  
          (select c_axh from t_ykc order by c_axh limit 1 offset 3)
             as c0, 
          ref_90.c_yjyf52_k as c1, 
          subq_0.c0 as c2, 
          subq_0.c0 as c3, 
          ref_90.c_axh as c4, 
          ref_90.c_z5h8od3 as c5, 
          subq_0.c0 as c6, 
          ref_90.c_l2i8lidec as c7
        from 
          (t_ykc as ref_90
            left outer join t_ykc as ref_91
            on (0<>0))
        where ((select c_erfnu from t_bbh order by c_erfnu limit 1 offset 2)
               = (select c_erfnu from t_bbh order by c_erfnu limit 1 offset 4)
              ) 
          and (ref_91.c_l2i8lidec >= subq_0.c0)
        order by c0, c1, c2, c3, c4, c5, c6, c7 desc limit 36))
union
select  
    ref_93.c_l2i8lidec as c0
  from 
    (t_ykc as ref_92
      left outer join t_ykc as ref_93
      on ((ref_92.c_mtp6pw <> 19) 
          and (1=1)))
  where ref_92.c_yjyf52_k is NULL;

