Search Results

Search: Posts Made By: STOIE
Forum: Web Development 01-03-2011
1,358
Posted By STOIE
Those are the lines I was originally thinking...
Those are the lines I was originally thinking along... but,

That will simply display the distinct city values, and only not show ones where "bob" is the only name associated.

I have now...
Forum: Web Development 01-03-2011
1,358
Posted By STOIE
Solved: SELECT DISTINCT(x.city) FROM places...
Solved:

SELECT DISTINCT(x.city) FROM places x WHERE NOT EXISTS (SELECT 1 FROM places y WHERE y.name = 'bob' AND x.city = y.city);
Forum: Web Development 01-03-2011
1,358
Posted By STOIE
SQL - Distinct plus more
Hi all,

I have an interesting and I am sure simple question for yau'll.

Basically this is what I am after:

The table:
CREATE TABLE places (id INT, city VARCHAR(24), name VARCHAR(24));
...
Showing results 1 to 3 of 3

 
All times are GMT -4. The time now is 04:36 AM.
Unix & Linux Forums Content Copyright 1993-2022. All Rights Reserved.
Privacy Policy