Advertisement
naimul64

Untitled

Apr 8th, 2017
204
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.55 KB | None | 0 0
  1. select left(composite_id,4), count(*) from pesp_db_p23_live.receiveddata
  2. where school_code in (91411052206)
  3. -- and remark in ('R', 'r');
  4. group by left(composite_id,4);
  5.  
  6. select left(composite_id,4), count(*) from pesp_db_p23_live.receiveddata
  7. where school_code in (91411052212)
  8. -- and remark in ('R', 'r');
  9. group by left(composite_id,4);
  10.  
  11.  
  12.  
  13.  
  14. select school_code, count(distinct composite_id) cnt
  15. from pesp_db_p23_live.receiveddata
  16. group by school_code
  17. having cnt = 0;
  18.  
  19. select count(distinct school_code)
  20. from pesp_db_p23_live.receiveddata;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement