2 Replies Latest reply: Jul 31, 2017 3:18 AM by Christelle Rachet RSS

    LOAD count

    Christelle Rachet

       

      Good morning,

       

      I try to count the nb of reinsurers per file, knowing that my data is grouped by ref1, ref2 and layer_no.

       

      Systems returns "Invalid expression" with the code below. Could you please let me know where is the mistake ?

       

       

       

      temp:
      LOAD ref1,
      ref2,
      layer_no,
      clm_rein_dist_no,
      ...,
      ...

       

      FROM [zzzz] ;

       

       

       

      Table_count:
      LOAD
      Distinct
      *,
      count (clm_rein_dist_no) as NbReassureurs
      Resident temp
      Group by ref1, ref2, layer_no ;
      DROP
      Table temp;

       

       

       

      For example :

       

         

      ref1ref2layer_noclm_rein_dist_no
      PR0015632 A 11
      PR0015632 A 12
      PR0015632 A 13
      PR0015632 A 14
      PR0015632 A 21
      PR0015632 A 22
      PR0015632 B 11
      PR0015632 B 12
      PR0015632 B 13
      PR0015632 B 14
      PR0015632 B 21
      PR0015632 B 22

       

      I expect the below result :

         

         

      ref1ref2layer_noNbReassureurs
      PR0015632 A 14
      PR0015632 B22
      PR0015632 A 14
      PR0015632 B22

       

       

      Thank you in advance for your help