From: Benaya Paul Date: November 22 2012 2:53pm Subject: Re: Basic SELECT help List-Archive: http://lists.mysql.com/mysql/228685 Message-Id: MIME-Version: 1.0 Content-Type: multipart/alternative; boundary=e89a8f838d8dc8e59a04cf16a02f --e89a8f838d8dc8e59a04cf16a02f Content-Type: text/plain; charset=ISO-8859-1 U can remove the type field it will work On Nov 22, 2012 8:21 PM, "Neil Tompkins" wrote: > Basically I only what to return the IDs that have both types. > > > On Thu, Nov 22, 2012 at 2:39 PM, marek gutowski >wrote: > > > SELECT DISTINCT id FROM table WHERE type IN ('2','5') > > > > should work > > > > > > On 22 November 2012 14:30, Neil Tompkins >wrote: > > > >> 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 > >> > > > > > --e89a8f838d8dc8e59a04cf16a02f--