<?xml version="1.0" encoding="ISO-8859-1"?>

<rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/">
	<channel>
		<title>ASP Free Forums - SQL Development</title>
		<link>http://forums.aspfree.com/</link>
		<description>SQL forums discussing structured query language related questions that are platform independent.  Discussions include advanced topics such as joins, stored procedures, and triggers.</description>
		<language>en</language>
		<lastBuildDate>Wed, 22 May 2013 20:37:44 GMT</lastBuildDate>
		<generator>vBulletin</generator>
		<ttl>60</ttl>
		<image>
			<url>http://forums.aspfree.com/images/misc/rss.png</url>
			<title>ASP Free Forums - SQL Development</title>
			<link>http://forums.aspfree.com/</link>
		</image>
		<item>
			<title>Beginner looking for a little help on a SQL statement.</title>
			<link>http://forums.aspfree.com/sql-development-6/beginner-looking-little-help-sql-statement-538453.html</link>
			<pubDate>Tue, 30 Apr 2013 21:52:18 GMT</pubDate>
			<description>Which stores sold the most turkey dinners during the Red Carpet Closeout promotion by day? 
 
Displays all stores with sales for the turkey dinner each day but I only want to display the store with the most sales for each day. So my result should only be displaying 7 results with the dollar amount...</description>
			<content:encoded><![CDATA[<div>Which stores sold the most turkey dinners during the Red Carpet Closeout promotion by day?<br />
<br />
Displays all stores with sales for the turkey dinner each day but I only want to display the store with the most sales for each day. So my result should only be displaying 7 results with the dollar amount for each day as well as which store. <br />
<br />
<br />
<br />
<br />
SELECT name,description &quot;Description&quot;, promotion_name &quot;Promotion Name&quot;,<br />
TO_CHAR(SUM(unit_sales), 'L99G999D99MI') AS &quot;Unit Sales&quot;, day_of_week &quot;Day&quot;<br />
  FROM store_data_warehouse.store<br />
     JOIN store_data_warehouse.sales_fact<br />
    USING (store_key)<br />
      JOIN store_data_warehouse.time<br />
        USING (time_key)<br />
      JOIN store_data_warehouse.product<br />
        USING (product_key)<br />
        JOIN store_data_warehouse.promotion<br />
            USING (promotion_key)<br />
          WHERE product_key = 3<br />
          AND promotion_key = 2<br />
          GROUP BY day_of_week, name, description, promotion_name<br />
          ORDER BY (SUM(unit_sales))DESC, name<br />
<br />
<br />
What am I missing?   Thanks for any and all help.</div>

]]></content:encoded>
			<category domain="http://forums.aspfree.com/sql-development-6/">SQL Development</category>
			<dc:creator>Lost_N_TN</dc:creator>
			<guid isPermaLink="true">http://forums.aspfree.com/sql-development-6/beginner-looking-little-help-sql-statement-538453.html</guid>
		</item>
	</channel>
</rss>
