<?xml version="1.0" encoding="UTF-8"?><rss version="2.0"
	xmlns:content="http://purl.org/rss/1.0/modules/content/"
	xmlns:dc="http://purl.org/dc/elements/1.1/"
	xmlns:atom="http://www.w3.org/2005/Atom"
	xmlns:sy="http://purl.org/rss/1.0/modules/syndication/"
	
	>
<channel>
	<title>
	Comments on: SQL Puzzle: Find Correlation Coefficients for the Run of Cricket Players	</title>
	<atom:link href="https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Tue, 23 Oct 2018 17:59:47 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>
		By: abraham		</title>
		<link>https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/#comment-6764</link>

		<dc:creator><![CDATA[abraham]]></dc:creator>
		<pubDate>Tue, 23 Oct 2018 17:59:47 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7509#comment-6764</guid>

					<description><![CDATA[with avg_tbl as(
select avg(runs) a, playername from tbl_players group by playername
),
cte as (
select playername, runs, matchyear, row_number() over (partition by matchyear order by playername) r from tbl_players
),
cte2 as (
select tb.playername, tb.runs ru1, tb.matchyear,p,ru ru2,av.a a1,av2.a a2, tb.runs-av.a a , ru-av2.a b,
       (tb.runs-av.a)*( ru-av2.a) axb,(tb.runs-av.a)*(tb.runs-av.a) asquared, ( ru-av2.a)*( ru-av2.a) bsquared  from cte as tb
cross apply (select playername p, runs ru, r from cte 
             where matchyear=tb.matchyear and playername  tb.playername and r&#062;tb.r ) as v

join avg_tbl av on av.playername= tb.playername
join avg_tbl av2 on av2.playername= p
) select sum(axb),sum(asquared), sum(bsquared),  sum(axb)/(sqrt(sum(asquared))*sqrt(sum(bsquared))) from cte2 group by playername,p]]></description>
			<content:encoded><![CDATA[<p>with avg_tbl as(<br />
select avg(runs) a, playername from tbl_players group by playername<br />
),<br />
cte as (<br />
select playername, runs, matchyear, row_number() over (partition by matchyear order by playername) r from tbl_players<br />
),<br />
cte2 as (<br />
select tb.playername, tb.runs ru1, tb.matchyear,p,ru ru2,av.a a1,av2.a a2, tb.runs-av.a a , ru-av2.a b,<br />
       (tb.runs-av.a)*( ru-av2.a) axb,(tb.runs-av.a)*(tb.runs-av.a) asquared, ( ru-av2.a)*( ru-av2.a) bsquared  from cte as tb<br />
cross apply (select playername p, runs ru, r from cte<br />
             where matchyear=tb.matchyear and playername  tb.playername and r&gt;tb.r ) as v</p>
<p>join avg_tbl av on av.playername= tb.playername<br />
join avg_tbl av2 on av2.playername= p<br />
) select sum(axb),sum(asquared), sum(bsquared),  sum(axb)/(sqrt(sum(asquared))*sqrt(sum(bsquared))) from cte2 group by playername,p</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/#comment-6517</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Wed, 04 Jul 2018 18:03:45 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7509#comment-6517</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/#comment-6514&quot;&gt;dinesh danny&lt;/a&gt;.

Sure, will help you. You can share more detail via contact me page and I will get back to you.]]></description>
			<content:encoded><![CDATA[<p>Sure, will help you. You can share more detail via contact me page and I will get back to you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: dinesh danny		</title>
		<link>https://www.dbrnd.com/2018/07/sql-puzzle-find-correlation-coefficients-for-the-run-of-cricket-players/#comment-6514</link>

		<dc:creator><![CDATA[dinesh danny]]></dc:creator>
		<pubDate>Wed, 04 Jul 2018 04:57:13 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=7509#comment-6514</guid>

					<description><![CDATA[Hi sir,
         I had seen your sql puzzle. really its very interesting. And more thing i need to learn Postgresql administration part can you please explain and post postgres.conf file information, vacuum analyze, MVCC concepts, replication concepts and all concepts.
               Because the way of explaining topics is very clear and very easy to understand. Can you please me.

regards,
Dinesh.A]]></description>
			<content:encoded><![CDATA[<p>Hi sir,<br />
         I had seen your sql puzzle. really its very interesting. And more thing i need to learn Postgresql administration part can you please explain and post postgres.conf file information, vacuum analyze, MVCC concepts, replication concepts and all concepts.<br />
               Because the way of explaining topics is very clear and very easy to understand. Can you please me.</p>
<p>regards,<br />
Dinesh.A</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
