SELECT DISTINCT 'Service type' FROM 'service_providers'
-Original Message-
From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]
Sent: 20 April 2006 12:45
To: mysql@lists.mysql.com
Subject: getting unique results
SELECT `Service type` FROM `service_providers`
How
>
>SELECT `Service type` FROM `service_providers`
>
>
>How do I get only unique results from this query. There are many services
called 'cafe' for example but I only want one.
Well, this could help:
select distinct `service type` FROM `service_providers`
Martijn
SELECT `Service type` FROM `service_providers`
How do I get only unique results from this query. There are many services
called 'cafe' for example but I only want one.
R.
* Petre Agenbag
> I am having trouble with a query to return only one instance of a name
> in a table.
SELECT DISTINCT name FROM table
> For instance:
>
> idnametowndate
> 1 jacktown1 2002-12-12
> 2 johntown2 2002-12-13
> 3 jacktown4 2002-12-21
> 4 ja
Hi
I am having trouble with a query to return only one instance of a name
in a table.
For instance:
id nametowndate
1 jacktown1 2002-12-12
2 johntown2 2002-12-13
3 jacktown4 2002-12-21
4 jacktown5 2002-12-30
5 johntown2 2002