SHARE
TWEET

Ryan - DL Rejections By day

ahmedrahil786 Jul 21st, 2019 57 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # no of members by reject reason
  2.  
  3. select
  4.  date_format(date(dl.created_at + interval 8 hour), "%Y-%m-%d") as cday,
  5.  count(dl.id) as total,
  6.  count(if(rc.id=1, dl.id, null)) as sf_cov_bydoc,
  7.  count(if(rc.id=2, dl.id, null)) as sf_wo_face,
  8.  count(if(rc.id=3, dl.id, null)) as sf_wo_doc,
  9.  count(if(rc.id=4, dl.id, null)) as dl_no_doc,
  10.  count(if(rc.id=5, dl.id, null)) as dl_doc_blur,
  11.  count(if(rc.id=6, dl.id, null)) as dl_expired,
  12.  count(if(rc.id=7, dl.id, null)) as pdl,
  13.  count(if(rc.id=8, dl.id, null)) as jpj_blacklist,
  14.  count(if(rc.id=9, dl.id, null)) as dl_unmatched,
  15.  count(if(rc.id=10, dl.id, null)) as pic_crop,
  16.  count(if(rc.id=11, dl.id, null)) as unser_21,
  17.  count(if(rc.id=12, dl.id, null)) as fake_id,
  18.  count(if(rc.id=13, dl.id, null)) as etc,
  19.  count(if(rc.id=14, dl.id, null)) as duplicate_IC,
  20.  count(if(rc.id=15, dl.id, null)) as IC_in_selfie_blur,
  21.  count(if(rc.id=16, dl.id, null)) as passport_blur,
  22.  count(if(rc.id=17, dl.id, null)) as unrelated
  23.  
  24.  
  25. from members m, driver_licenses dl, driver_license_reject_categories rc
  26. where
  27.  m.id = dl.member_id
  28.  and m.imaginary in ('sofam', 'normal')
  29.  and dl.state = 'reject'
  30.  and dl.reject_category_id = rc.id
  31. group by cday
  32. order by cday desc
  33.  
  34. ;
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
 
Top