1 Reply Latest reply: May 2, 2017 4:17 AM by Shiva Nagesh Bodepudi RSS

    SQL to QV

    Alexandre HOLZHAMMER

      How to write in script for a graphic this SQL query :


      SELECT Max(Sum(Qté receptionnée)) From table GROUP BY Site;


      Thanks =)

        • Re: SQL to QV
          Shiva Nagesh Bodepudi

          If you want to get the max of sum(Qté receptionnée) among all the sites, the above sql query will not work i guess.


          We cant use a aggr function inside another aggr function.


          Your SQL query should be something like SELECT Max(B.A) From (SELECT Sum(Qté receptionnée) as A From table GROUP BY Site)B.


          And in qlikview you can use it as


          Load max(A) as max;


          Load sum(Qté receptionnée) as A


          Resident table / From filename

          Group by Site