<?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: Ignore duplicate entries in MySQL select using DISTINCT keyword</title>
	<atom:link href="http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/feed/" rel="self" type="application/rss+xml" />
	<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/</link>
	<description>Computer and technology tutorials and guides</description>
	<lastBuildDate>Fri, 10 Feb 2012 12:22:53 +0000</lastBuildDate>
	<generator>http://wordpress.org/?v=2.9.2</generator>
	<sy:updatePeriod>hourly</sy:updatePeriod>
	<sy:updateFrequency>1</sy:updateFrequency>
		<item>
		<title>By: Hansie</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-47598</link>
		<dc:creator>Hansie</dc:creator>
		<pubDate>Thu, 31 Mar 2011 10:29:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-47598</guid>
		<description>pl can anybody help!!
i m stuck with this, select * from table where this!=that and column should be distinct </description>
		<content:encoded><![CDATA[<p>pl can anybody help!!<br />
i m stuck with this, select * from table where this!=that and column should be distinct</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: bwy</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-44448</link>
		<dc:creator>bwy</dc:creator>
		<pubDate>Fri, 03 Dec 2010 21:54:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-44448</guid>
		<description>Use 

ORDER BY dateofevent DESC</description>
		<content:encoded><![CDATA[<p>Use </p>
<p>ORDER BY dateofevent DESC</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Britinusag1</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-42642</link>
		<dc:creator>Britinusag1</dc:creator>
		<pubDate>Fri, 24 Sep 2010 15:15:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-42642</guid>
		<description>How about selecting the most recent of all the duplicates?
ie. If table has columns table.key,table.userid,table.dateofevent,table.event

Then how to select the most recent event for each userid?

TIA.

Paul</description>
		<content:encoded><![CDATA[<p>How about selecting the most recent of all the duplicates?<br />
ie. If table has columns table.key,table.userid,table.dateofevent,table.event</p>
<p>Then how to select the most recent event for each userid?</p>
<p>TIA.</p>
<p>Paul</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Brian</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-37986</link>
		<dc:creator>Brian</dc:creator>
		<pubDate>Mon, 08 Mar 2010 15:44:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-37986</guid>
		<description>You can&#039;t do that with DISTINCT.

You would do that using GROUP BY on your query. MySQL will maintain association of the row data, so you can&#039;t for example select distinct givenname and return all of the party results at the same time because one might return 50 results and the other only 2 or something of that nature.

You may be looking for something more like:
SELECT givenname, party FROM presidents GROUP BY givenname

This will return a resultset with each row having a distinct givenname while also returning the associated party for that person.</description>
		<content:encoded><![CDATA[<p>You can&#8217;t do that with DISTINCT.</p>
<p>You would do that using GROUP BY on your query. MySQL will maintain association of the row data, so you can&#8217;t for example select distinct givenname and return all of the party results at the same time because one might return 50 results and the other only 2 or something of that nature.</p>
<p>You may be looking for something more like:<br />
SELECT givenname, party FROM presidents GROUP BY givenname</p>
<p>This will return a resultset with each row having a distinct givenname while also returning the associated party for that person.</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Frank</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-37220</link>
		<dc:creator>Frank</dc:creator>
		<pubDate>Mon, 01 Feb 2010 18:37:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-37220</guid>
		<description>Thanks, this helped me solve a big problem. You&#039;re the man!</description>
		<content:encoded><![CDATA[<p>Thanks, this helped me solve a big problem. You&#8217;re the man!</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: indian blogs</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-35758</link>
		<dc:creator>indian blogs</dc:creator>
		<pubDate>Sat, 21 Nov 2009 15:28:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-35758</guid>
		<description>this is what i was searching :) thaks man </description>
		<content:encoded><![CDATA[<p>this is what i was searching :) thaks man</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: Anonymous</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-35299</link>
		<dc:creator>Anonymous</dc:creator>
		<pubDate>Tue, 27 Oct 2009 09:16:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-35299</guid>
		<description>hey maverick i was just wondering if u got the answer to ur question ????
am having the same problem ...
thanx </description>
		<content:encoded><![CDATA[<p>hey maverick i was just wondering if u got the answer to ur question ????<br />
am having the same problem &#8230;<br />
thanx</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: chandan</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-32620</link>
		<dc:creator>chandan</dc:creator>
		<pubDate>Fri, 14 Aug 2009 16:32:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-32620</guid>
		<description>some weird distinct in mysql 5.0.1 version :(</description>
		<content:encoded><![CDATA[<p>some weird distinct in mysql 5.0.1 version :(</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: maverick</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-32294</link>
		<dc:creator>maverick</dc:creator>
		<pubDate>Thu, 30 Jul 2009 05:51:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-32294</guid>
		<description>How do you select query with multiple columns unique distinct values from a single  column? 

statement:
 select givenname, party from presidents;

I want only the givenname to be distinct and not the party? 
</description>
		<content:encoded><![CDATA[<p>How do you select query with multiple columns unique distinct values from a single  column? </p>
<p>statement:<br />
 select givenname, party from presidents;</p>
<p>I want only the givenname to be distinct and not the party?</p>
]]></content:encoded>
	</item>
	<item>
		<title>By: mistat</title>
		<link>http://www.tech-recipes.com/rx/1481/ignore-duplicate-entries-in-mysql-select-using-distinct-keyword/comment-page-1/#comment-31066</link>
		<dc:creator>mistat</dc:creator>
		<pubDate>Sat, 13 Jun 2009 12:40:00 +0000</pubDate>
		<guid isPermaLink="false">guid-fix-me!#comment-31066</guid>
		<description>Works a charm - just what I was looking for - thanks!</description>
		<content:encoded><![CDATA[<p>Works a charm &#8211; just what I was looking for &#8211; thanks!</p>
]]></content:encoded>
	</item>
</channel>
</rss>

<!-- Performance optimized by W3 Total Cache. Learn more: http://www.w3-edge.com/wordpress-plugins/

Page Caching using memcached (User agent is rejected)
Database Caching 2/17 queries in 1.108 seconds using memcached
Object Caching 418/424 objects using memcached

Served from: www.tech-recipes.com @ 2012-02-10 12:02:39 -->
