3 Replies Latest reply: Nov 9, 2017 11:25 AM by Andrea Gigliotti RSS

    Set analysis with max and aggr

    Francesco Leoni

      HI All,


      can you please help with the following?


      I need to translate in Qlik set analysis the follwoing query


      select sum(TotalPayment) from (

      select a.*, b.s_id as claimantUID2 from analytics.payment a

      join analytics.Claimant b on a.ClaimantUID = b.s_id

      join analytics.Claim c on b.ClaimUID = c.s_id

      join ( select ClaimID, ClaimantID, max(claimantRank) as MaxClaimantRank

      from analytics.Claimant where ClaimantDate <= '2011-01-01'

      group by ClaimID, ClaimantID

      ) d on d.ClaimantID = b.ClaimantID and d.MaxClaimantRank = b.claimantRank

      where a.Status = 'Issued' and

      PaymentDate <= '2011-01-01'


      ) a