<?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 join queries in SAS Enterprise Guide</title>
    <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/join-queries/m-p/28524#M3998</link>
    <description>Just started using EG (and SAS for that matter) and was wondering if it is possible to create two queries on top of a single table, and then create a query using the results of the first two queries.   &lt;BR /&gt;
&lt;BR /&gt;
I have three columns; one for sales territories, one for product and one dollars.  I am trying to group the query so I have a percentage mix product calculated for each territory.  I was trying to accomplish this by quering up the sums into two queries, then using a join and expression builder to finish off the math.   &lt;BR /&gt;
&lt;BR /&gt;
Is this possible within a single query? &lt;BR /&gt;
&lt;BR /&gt;
Thanks for help (using EG 4.1)</description>
    <pubDate>Mon, 30 Jun 2008 21:49:51 GMT</pubDate>
    <dc:creator>eabegg</dc:creator>
    <dc:date>2008-06-30T21:49:51Z</dc:date>
    <item>
      <title>join queries</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/join-queries/m-p/28524#M3998</link>
      <description>Just started using EG (and SAS for that matter) and was wondering if it is possible to create two queries on top of a single table, and then create a query using the results of the first two queries.   &lt;BR /&gt;
&lt;BR /&gt;
I have three columns; one for sales territories, one for product and one dollars.  I am trying to group the query so I have a percentage mix product calculated for each territory.  I was trying to accomplish this by quering up the sums into two queries, then using a join and expression builder to finish off the math.   &lt;BR /&gt;
&lt;BR /&gt;
Is this possible within a single query? &lt;BR /&gt;
&lt;BR /&gt;
Thanks for help (using EG 4.1)</description>
      <pubDate>Mon, 30 Jun 2008 21:49:51 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/join-queries/m-p/28524#M3998</guid>
      <dc:creator>eabegg</dc:creator>
      <dc:date>2008-06-30T21:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: join queries</title>
      <link>https://communities.sas.com/t5/SAS-Enterprise-Guide/join-queries/m-p/28525#M3999</link>
      <description>Generally, yes.  It's called a "correlated subquery".  I believe there is an example like that in the SQL chapter in the base manual.&lt;BR /&gt;
&lt;BR /&gt;
You'll have to do it in a code node; the Query &amp;amp; Report task is not sophisticated enough to do that.&lt;BR /&gt;
&lt;BR /&gt;
Doc Muhlbaier&lt;BR /&gt;
Duke</description>
      <pubDate>Tue, 01 Jul 2008 01:43:46 GMT</pubDate>
      <guid>https://communities.sas.com/t5/SAS-Enterprise-Guide/join-queries/m-p/28525#M3999</guid>
      <dc:creator>Doc_Duke</dc:creator>
      <dc:date>2008-07-01T01:43:46Z</dc:date>
    </item>
  </channel>
</rss>

