From: Mike OK Date: November 22 2012 2:39pm Subject: Re: Basic SELECT help List-Archive: http://lists.mysql.com/mysql/228682 Message-Id: MIME-Version: 1.0 Content-Type: text/plain; format=flowed; charset="iso-8859-1"; reply-type=original Content-Transfer-Encoding: 7bit Hi Neil Would something like this work. SELECT DISTINCT id,type from your_table WHERE type=2 OR type=5; Mike ----- Original Message ----- From: "Neil Tompkins" To: "[MySQL]" Sent: Thursday, November 22, 2012 9:30 AM Subject: Basic SELECT help > Hi, > > I'm struggling with what I think is a basic select but can't think how to > do it : My data is > > id,type > > 1000,5 > 1001,5 > 1002,2 > 1001,2 > 1003,2 > 1005,2 > 1006,1 > > From this I what to get a distinct list of id where the type equals 2 and > 5 > > Any ideas ? > > Neil >