<?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: SQL Advance Query &#8211; Find Employee with salary greater than their Manager	</title>
	<atom:link href="https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/feed/" rel="self" type="application/rss+xml" />
	<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/</link>
	<description>BIGData &#124; NoSQL &#124; MSSQL &#124; MySQL &#124; PostgreSQL</description>
	<lastBuildDate>Thu, 21 Mar 2019 15:10:41 +0000</lastBuildDate>
	<sy:updatePeriod>
	hourly	</sy:updatePeriod>
	<sy:updateFrequency>
	1	</sy:updateFrequency>
	<generator>https://wordpress.org/?v=7.0.6</generator>
	<item>
		<title>
		By: Marcel Hofman		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6922</link>

		<dc:creator><![CDATA[Marcel Hofman]]></dc:creator>
		<pubDate>Thu, 21 Mar 2019 15:10:41 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6922</guid>

					<description><![CDATA[SELECT * FROM empsalary
WHERE managerid IS NOT NULL AND empsalary &#062; (SELECT MAX(empsalary) FROM empsalary WHERE managerid IS NULL)]]></description>
			<content:encoded><![CDATA[<p>SELECT * FROM empsalary<br />
WHERE managerid IS NOT NULL AND empsalary &gt; (SELECT MAX(empsalary) FROM empsalary WHERE managerid IS NULL)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6152</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 28 Jan 2018 19:17:17 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6152</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6151&quot;&gt;Janet&lt;/a&gt;.

The filter that you applied inside the subquery which is not returning any data. 
I modified your query, 
select * from empsalary as e
where e.empsalary &gt; (select e1.empsalary from empsalary as e1 where e.ManagerID = e1.EmpID )]]></description>
			<content:encoded><![CDATA[<p>The filter that you applied inside the subquery which is not returning any data.<br />
I modified your query,<br />
select * from empsalary as e<br />
where e.empsalary > (select e1.empsalary from empsalary as e1 where e.ManagerID = e1.EmpID )</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Janet		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6151</link>

		<dc:creator><![CDATA[Janet]]></dc:creator>
		<pubDate>Sun, 28 Jan 2018 19:10:48 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6151</guid>

					<description><![CDATA[Yes, it is working, but mine is not working and I&#039;m trying to understand why it is not. Thank you.]]></description>
			<content:encoded><![CDATA[<p>Yes, it is working, but mine is not working and I&#8217;m trying to understand why it is not. Thank you.</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Anvesh Patel		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6150</link>

		<dc:creator><![CDATA[Anvesh Patel]]></dc:creator>
		<pubDate>Sun, 28 Jan 2018 19:08:56 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6150</guid>

					<description><![CDATA[In reply to &lt;a href=&quot;https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6149&quot;&gt;Janet&lt;/a&gt;.

Your alternative solution (correlated subquery ) is similar to Shamanth, please try the solution given by him. 
Select * From Empsalary E
Where E.EmpSalary &gt;
(Select E1.Empsalary From Empsalary E1
Where E.ManagerID=E1.EmpID)]]></description>
			<content:encoded><![CDATA[<p>Your alternative solution (correlated subquery ) is similar to Shamanth, please try the solution given by him.<br />
Select * From Empsalary E<br />
Where E.EmpSalary ><br />
(Select E1.Empsalary From Empsalary E1<br />
Where E.ManagerID=E1.EmpID)</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Janet		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6149</link>

		<dc:creator><![CDATA[Janet]]></dc:creator>
		<pubDate>Sun, 28 Jan 2018 18:57:29 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6149</guid>

					<description><![CDATA[Why my query does not work?

select * from empsalary as e
where e.empsalary=(select e1.empsalary from empsalary as e1 where e.EmpID = e1.ManagerID and e1.EmpSalary &#062; e.EmpSalary)

It&#039;s result is null. What is the correct format if I want to use subquery? Thank you]]></description>
			<content:encoded><![CDATA[<p>Why my query does not work?</p>
<p>select * from empsalary as e<br />
where e.empsalary=(select e1.empsalary from empsalary as e1 where e.EmpID = e1.ManagerID and e1.EmpSalary &gt; e.EmpSalary)</p>
<p>It&#8217;s result is null. What is the correct format if I want to use subquery? Thank you</p>
]]></content:encoded>
		
			</item>
		<item>
		<title>
		By: Shamanth		</title>
		<link>https://www.dbrnd.com/2017/11/sql-puzzle-sql-advance-query-find-employee-with-salary-greater-than-their-manager/#comment-6050</link>

		<dc:creator><![CDATA[Shamanth]]></dc:creator>
		<pubDate>Thu, 30 Nov 2017 12:10:44 +0000</pubDate>
		<guid isPermaLink="false">https://www.dbrnd.com/?p=5764#comment-6050</guid>

					<description><![CDATA[Using Sub-Query:

Select * From Empsalary E
Where E.EmpSalary &#062; 
 (Select E1.Empsalary From Empsalary E1 
Where E.ManagerID=E1.EmpID)]]></description>
			<content:encoded><![CDATA[<p>Using Sub-Query:</p>
<p>Select * From Empsalary E<br />
Where E.EmpSalary &gt;<br />
 (Select E1.Empsalary From Empsalary E1<br />
Where E.ManagerID=E1.EmpID)</p>
]]></content:encoded>
		
			</item>
	</channel>
</rss>
