<?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 expression for sql script in QlikView</title>
    <link>https://community.qlik.com/t5/QlikView/expression-for-sql-script/m-p/631295#M1093151</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have this sql script which gives desired result in source db. I want to get the same result in qlikivew.&lt;/P&gt;&lt;P&gt;I have the data model setup in qlikview with the same table relationships(links/associations) as in source db.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;Date, &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;SUM(Total) As TotalRevenue&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;FROM&amp;nbsp; Booking &lt;/P&gt;&lt;P&gt;INNER JOIN&lt;/P&gt;&lt;P&gt;Candidate ON Booking.Bookingid = Candidate.Candidateid &lt;/P&gt;&lt;P&gt;INNER JOIN&lt;/P&gt;&lt;P&gt;BookingTotal ON Booking.Bookingid = BookingTotal.Totalid &lt;/P&gt;&lt;P&gt;GROUP BY Date&lt;/P&gt;&lt;P&gt;ORDER BY Date desc, SUM(Total) desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The above sql script contain inner join, which is not done in qlikview model for those tables. So, since qlikview model has no joins(has only associations), how can i get the same result in qlikview which i see in source db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What could be the expression i can write in qlikview UI, if i am using Straight table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to create aggregate table in qlikview script. Just a direct expression in the straight table with Date as dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 13 May 2014 11:10:04 GMT</pubDate>
    <dc:creator>surajap123</dc:creator>
    <dc:date>2014-05-13T11:10:04Z</dc:date>
    <item>
      <title>expression for sql script</title>
      <link>https://community.qlik.com/t5/QlikView/expression-for-sql-script/m-p/631295#M1093151</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi All,&lt;/P&gt;&lt;P&gt;I have this sql script which gives desired result in source db. I want to get the same result in qlikivew.&lt;/P&gt;&lt;P&gt;I have the data model setup in qlikview with the same table relationships(links/associations) as in source db.&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;SELECT&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;Date, &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;SUM(Total) As TotalRevenue&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;FROM&amp;nbsp; Booking &lt;/P&gt;&lt;P&gt;INNER JOIN&lt;/P&gt;&lt;P&gt;Candidate ON Booking.Bookingid = Candidate.Candidateid &lt;/P&gt;&lt;P&gt;INNER JOIN&lt;/P&gt;&lt;P&gt;BookingTotal ON Booking.Bookingid = BookingTotal.Totalid &lt;/P&gt;&lt;P&gt;GROUP BY Date&lt;/P&gt;&lt;P&gt;ORDER BY Date desc, SUM(Total) desc&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1. The above sql script contain inner join, which is not done in qlikview model for those tables. So, since qlikview model has no joins(has only associations), how can i get the same result in qlikview which i see in source db.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2. What could be the expression i can write in qlikview UI, if i am using Straight table?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I dont want to create aggregate table in qlikview script. Just a direct expression in the straight table with Date as dimension.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 May 2014 11:10:04 GMT</pubDate>
      <guid>https://community.qlik.com/t5/QlikView/expression-for-sql-script/m-p/631295#M1093151</guid>
      <dc:creator>surajap123</dc:creator>
      <dc:date>2014-05-13T11:10:04Z</dc:date>
    </item>
  </channel>
</rss>

