create table t_eid ( 
c_s INTEGER ,
c_rk TEXT ,
c_fd1o2a TEXT ,
c_m INTEGER ,
c_dnh5b072z TEXT ,
primary key(c_m),
unique(c_m, c_s)
);

insert into t_eid values 
(cast(coalesce((74 % 87),
  4) as SIGNED), 'lubfjs7', 'h34', 39 , 'q'), 
(32, 'bbnz', 'aii', 10, 'hhesb2krw');

select  
    ref_4.c_fd1o2a as c9
  from 
    t_eid as ref_4
  where ref_4.c_s = ( 
    select distinct 
          (select c_s from t_eid order by c_s limit 1 offset 1)
             as c0
        from 
          t_eid as ref_5
        where (ref_4.c_m between (select c_s from t_eid order by c_s limit 1 offset 5)
               and ref_4.c_s) 
          or (1=1)
      union
      select  
          ref_6.c_s as c0
        from 
          t_eid as ref_6
        where ((select c_s from t_eid order by c_s limit 1 offset 5) <> ref_4.c_m) 
    );

