<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://blog.alecl.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Alec Lazarescu's Blog : Creative, SQL Server</title><link>http://blog.alecl.com/archive/tags/Creative/SQL+Server/default.aspx</link><description>Tags: Creative, SQL Server</description><dc:language>en</dc:language><generator>CommunityServer 2.1 SP2 (Build: 61129.2)</generator><item><title>Creative Queries</title><link>http://blog.alecl.com/archive/2007/06/18/creative-queries.aspx</link><pubDate>Mon, 18 Jun 2007 23:26:00 GMT</pubDate><guid isPermaLink="false">022ae8cf-15ca-4180-8062-b150ad1660bf:3</guid><dc:creator>alecl</dc:creator><slash:comments>0</slash:comments><comments>http://blog.alecl.com/comments/3.aspx</comments><wfw:commentRss>http://blog.alecl.com/commentrss.aspx?PostID=3</wfw:commentRss><description>&lt;P&gt;Two interesting techniques I came upon:&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Using OVER() with Aggregate Functions" href="http://www.sqlteam.com/article/sql-sever-2005-using-over-with-aggregate-functions" target=_blank&gt;http://www.sqlteam.com/article/sql-sever-2005-using-over-with-aggregate-functions&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Retrieve aggregate data using OVER(Partition by ...) rather than doing another join&lt;/P&gt;
&lt;P&gt;&lt;A class="" title="Using GROUP BY to avoid self joins" href="http://weblogs.sqlteam.com/jeffs/archive/2007/06/12/60230.aspx" target=_blank&gt;http://weblogs.sqlteam.com/jeffs/archive/2007/06/12/60230.aspx&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Using GROUP BY in some cases to avoid a self-join&lt;/P&gt;
&lt;div class = "shareblock"&gt;&lt;strong&gt;Share this post:&lt;/strong&gt; &lt;a title="Email Creative+Queries" href = "mailto:?body=Thought you might like this: http://blog.alecl.com/archive/2007/06/18/creative-queries.aspx&amp;subject=Creative+Queries"&gt;Email it!&lt;/a&gt; | &lt;a href = "http://del.icio.us/post?url=http://blog.alecl.com/archive/2007/06/18/creative-queries.aspx&amp;title=Creative+Queries" title="Submit Creative+Queries to del.icio.us" &gt;bookmark it!&lt;/a&gt; | &lt;a href = "http://www.digg.com/submit?url=http://blog.alecl.com/archive/2007/06/18/creative-queries.aspx&amp;phase=2" title="Submit Creative+Queries to digg.com"&gt;digg it!&lt;/a&gt; | &lt;a href = "http://reddit.com/submit?url=http://blog.alecl.com/archive/2007/06/18/creative-queries.aspx&amp;title=Creative+Queries" title="Submit Creative+Queries to reddit.com"&gt;reddit!&lt;/a&gt;&lt;/div&gt;&lt;img src="http://blog.alecl.com/aggbug.aspx?PostID=3" width="1" height="1"&gt;</description><category domain="http://blog.alecl.com/archive/tags/Creative/default.aspx">Creative</category><category domain="http://blog.alecl.com/archive/tags/T-SQL/default.aspx">T-SQL</category><category domain="http://blog.alecl.com/archive/tags/SQL+Server/default.aspx">SQL Server</category></item></channel></rss>