<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic Using group by clause in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/Using-group-by-clause/m-p/322991#M1196830</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mucho,&lt;/P&gt;&lt;P&gt;I think this code may help you to use group by and order by in your scrips:&lt;/P&gt;&lt;P&gt;Load 'IP Test Volume &amp;amp; RevenueWIP1' as Volumename,name as testname,billdate AS TESTDATE,price as Testamount, itemid as Testvol;&lt;BR /&gt;select t.name,ipbid.itemid,ipbid.price,ipb.billdate&lt;BR /&gt;from ipbill ipb inner join ipbillpackageitemdetail ipbid on ipb.billno = ipbid.billno&lt;BR /&gt;inner join test t on ipbid.itemid = t.id&lt;BR /&gt;where ipbid.serviceid = 8 AND Year(ipb.billdate) = Year(GETDATE())-1;&lt;/P&gt;&lt;P&gt;//IP Test Volume &amp;amp; Revenue within Package&lt;BR /&gt;Load 'IP Test Volume &amp;amp; RevenueWIP2' as Volumename,name as testname,billdate AS TESTDATE,(apolloprice - categoryprice) as Testamount, itemid as Testvol;&lt;BR /&gt;select t.name,ipbid.itemid,ipbid.apolloprice, ipbid.categoryprice,ipb.billdate&lt;BR /&gt;from ipbill ipb inner join ipbillpackageitemdetail ipbid on ipb.billno = ipbid.billno&lt;BR /&gt;inner join test t on ipbid.itemid = t.id&lt;BR /&gt;where ipbid.serviceid = 8 AND Year(ipb.billdate) = Year(GETDATE())-1;&lt;BR /&gt;&lt;BR /&gt;Volume:&lt;BR /&gt;noconcatenate Load Volumename,testname,date(TESTDATE) as TESTDATE,Sum(Testamount) as Testamount, sum(Testvol) as Testvol resident Volume_TEMP group by Volumename,testname,TESTDATE;&lt;BR /&gt;drop table Volume_TEMP;&lt;BR /&gt;store Volume into [..\DataSources\QVDOLD\Volumeinfo.QVD](qvd);&lt;BR /&gt;drop table Volume;&lt;/P&gt;&lt;P&gt;Please let me know if that will serve your purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 20 Apr 2011 09:53:40 GMT</pubDate>
    <dc:creator />
    <dc:date>2011-04-20T09:53:40Z</dc:date>
    <item>
      <title>Using group by clause</title>
      <link>https://community.qlik.com/t5/QlikView/Using-group-by-clause/m-p/322990#M1196829</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Im new in QV and i need to know something.&lt;/P&gt;&lt;P&gt;Lets say i have table like this:&lt;/P&gt;&lt;P&gt;id, prodID, A, B, C, D, E&lt;BR /&gt;01, 11A1, 100, 1, , 500, 2010&lt;BR /&gt;01, 11A1, 200, , 5, 700, 2010&lt;BR /&gt;01, 11A1, ,7, , 2010&lt;/P&gt;&lt;P&gt;now i need to group them. So do i need to use max(), count(), sum() all fields except id, prodID?&lt;BR /&gt;if i have many fields it's making trouble right?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 09:35:26 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-group-by-clause/m-p/322990#M1196829</guid>
      <dc:creator />
      <dc:date>2011-04-20T09:35:26Z</dc:date>
    </item>
    <item>
      <title>Using group by clause</title>
      <link>https://community.qlik.com/t5/QlikView/Using-group-by-clause/m-p/322991#M1196830</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mucho,&lt;/P&gt;&lt;P&gt;I think this code may help you to use group by and order by in your scrips:&lt;/P&gt;&lt;P&gt;Load 'IP Test Volume &amp;amp; RevenueWIP1' as Volumename,name as testname,billdate AS TESTDATE,price as Testamount, itemid as Testvol;&lt;BR /&gt;select t.name,ipbid.itemid,ipbid.price,ipb.billdate&lt;BR /&gt;from ipbill ipb inner join ipbillpackageitemdetail ipbid on ipb.billno = ipbid.billno&lt;BR /&gt;inner join test t on ipbid.itemid = t.id&lt;BR /&gt;where ipbid.serviceid = 8 AND Year(ipb.billdate) = Year(GETDATE())-1;&lt;/P&gt;&lt;P&gt;//IP Test Volume &amp;amp; Revenue within Package&lt;BR /&gt;Load 'IP Test Volume &amp;amp; RevenueWIP2' as Volumename,name as testname,billdate AS TESTDATE,(apolloprice - categoryprice) as Testamount, itemid as Testvol;&lt;BR /&gt;select t.name,ipbid.itemid,ipbid.apolloprice, ipbid.categoryprice,ipb.billdate&lt;BR /&gt;from ipbill ipb inner join ipbillpackageitemdetail ipbid on ipb.billno = ipbid.billno&lt;BR /&gt;inner join test t on ipbid.itemid = t.id&lt;BR /&gt;where ipbid.serviceid = 8 AND Year(ipb.billdate) = Year(GETDATE())-1;&lt;BR /&gt;&lt;BR /&gt;Volume:&lt;BR /&gt;noconcatenate Load Volumename,testname,date(TESTDATE) as TESTDATE,Sum(Testamount) as Testamount, sum(Testvol) as Testvol resident Volume_TEMP group by Volumename,testname,TESTDATE;&lt;BR /&gt;drop table Volume_TEMP;&lt;BR /&gt;store Volume into [..\DataSources\QVDOLD\Volumeinfo.QVD](qvd);&lt;BR /&gt;drop table Volume;&lt;/P&gt;&lt;P&gt;Please let me know if that will serve your purpose.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 20 Apr 2011 09:53:40 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/Using-group-by-clause/m-p/322991#M1196830</guid>
      <dc:creator />
      <dc:date>2011-04-20T09:53:40Z</dc:date>
    </item>
  </channel>
</rss>

