<commit_before>
-- 统计本年月内总计拣货的箱数，
-- 同时可用于  统计本月内 拣货单的明细数据。

select sum(tpd.fqtystr) --tpd.num, tpd.line, tpd.fqtystr, tp.flstupdtime
  from tpickupdtl tpd
  left join tpickup tp on tp.num = tpd.num
 where to_char(tp.flstupdtime, 'yyyyMMdd') like '201706%'
   and tpd.fqtystr not like '%+%'
   and tpd.fowner = '100081'
 order by tpd.num, tpd.line;


--统计本月内 每个员工总计拣货箱数。
select sum(tpd.fqtystr) num,
       tpd.fpicker,
       (select employee.name from employee where employee.gid = tpd.fpicker) fname
  from tpickupdtl tpd
  left join tpickup tp on tp.num = tpd.num
 where tpd.fowner = '100081'
   and tp.stat <> 5210
   and tpd.fqtystr not like '%+%'
   and tpd.fpicker <> 0
   and tpd.fpicker||'-' <> '-'
   and to_char(tp.flstupdtime, 'yyyyMMdd') like '201707%'
 group by tpd.fpicker;


 
 <commit_msg>拣货情况查询 新加两个查询  拣货零头查询  和 新的查询脚本<commit_after>
-- 统计本年月内总计拣货的箱数，
-- 同时可用于  统计本月内 拣货单的明细数据。

select sum(tpd.fqtystr) --tpd.num, tpd.line, tpd.fqtystr, tp.flstupdtime
  from tpickupdtl tpd
  left join tpickup tp on tp.num = tpd.num
 where to_char(tp.flstupdtime, 'yyyyMMdd') like '201706%'
   and tpd.fqtystr not like '%+%'
   and tpd.fowner = '100081'
 order by tpd.num, tpd.line;


--统计本月内 每个员工总计拣货箱数。
select sum(tpd.fqtystr) num,
       tpd.fpicker,
       (select employee.name from employee where employee.gid = tpd.fpicker) fname
  from tpickupdtl tpd
  left join tpickup tp on tp.num = tpd.num
 where tpd.fowner = '100081'
   and tp.stat <> 5210
   and tpd.fqtystr not like '%+%'
   and tpd.fpicker <> 0
   and tpd.fpicker || '-' <> '-'
   and to_char(tp.flstupdtime, 'yyyyMMdd') like '201707%'
 group by tpd.fpicker;

select tpd.num,
       tpd.fqtystr,
       tpd.fpicker,
       (select employee.name from employee where employee.gid = tpd.fpicker) fname
  from tpickupdtl tpd
  left join tpickup tp on tp.num = tpd.num
 where tpd.fowner = '100081'
   and tp.stat <> 5210
   and tpd.fqtystr like '%+%'
   and tpd.fpicker <> 0
   and tpd.fpicker || '-' <> '-'
   and to_char(tp.flstupdtime, 'yyyyMMdd') like '201707%'


select tc.FSRCNUM      来源单号,
       TC.FJOBID       配货作业号,
       tc.num          配货通知单号,
       tp.num          拣货单号,
       tpd.line        行号,
       ts.fname        门店名称,
       t.fcode         商品代码,
       t.fname         商品名称,
       tpd.fqpcstr     商品规格,
       tpd.fqtystr     箱数,
       tpd.fqpc        包装规格,
       tpd.fqty        件数,
       tpd.fpalletcode 托盘条码,
       tpd.FCHESTNUM   周转箱条码,
       E.NAME          拣货员,
       TP.FLSTUPDTIME  时间
  from TPICKUPDTL tpd
  left join tpickup tp on tp.num = tpd.num
  left join talcntc tc on tpd.falcntc = tc.num
  left join tstore ts on TP.FSTORE = TS.FCODE
  left join tarticle t ON tpd.farticle = t.fgid
  left join employee e on tpd.fpicker = E.GID
 where tpd.fowner = '100081'
   and tp.stat <> 5210
   and tpd.fqtystr not like '%+%'
   and tpd.fpicker <> 0
   and tpd.fpicker || '-' <> '-'
   and to_char(tp.flstupdtime, 'yyyyMMdd') like '201707%'
 order by TP.FLSTUPDTIME;
{'fraction_non_alphanumeric': 0.11485348602222971, 'fraction_numerical': 0.030986864264061973, 'mean_word_length': 2.4494773519163764, 'pattern_counts': {'":': 0, '<': 15, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4109866', 'n_tokens_mistral': 1449, 'n_tokens_neox': 1433, 'n_words': 307}