5 Replies Latest reply: May 1, 2012 9:24 AM by sb92075 RSS

    Caluculating No.of missed inspections in past 12 months

    Copter
      Hi all,
      I am trying to come up with a query to see how many missed inspections are there for a person in past 12 months. the data in my table is like this

      Case_no------person_id-----Ind_inspection---inspection_month
      1000----------234--------------------Y-----------------01-NOV-08
      1000----------234--------------------N-----------------01-DEC-08
      1000----------234--------------------Y-----------------01-JAN-09
      1000----------234--------------------Y-----------------01-MAR-09
      1002----------135--------------------Y-----------------01-OCT-11
      1002----------135--------------------Y-----------------01-JAN-12
      1002----------135--------------------N-----------------01-SEP-11
      1002----------135--------------------Y-----------------01-AUG-11
      1002----------135--------------------Y-----------------01-NOV-11

      Can you guys help me out in calculating this.