Existential quantifier

From: Dag-Erling Smørgrav <des(at)des(dot)no>
To: pgsql-sql(at)postgresql(dot)org
Subject: Existential quantifier
Date: 2009-10-09 22:53:47
Message-ID: 86bpkgqiv8.fsf@ds4.des.no
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-sql

Consider the attached schema (filmstars.sql), which is a poorly designed
database of films and actors. The following query gives me a list of
films in which either Charlie or Martin Sheen starred:

select fs.film.title, fs.film.year
from fs.film left join fs.star on fs.film.id = fs.star.film
where fs.star.last = 'Sheen'
group by fs.film.title, fs.film.year;

Is there a way to do this without the "group by" clause?

DES
--
Dag-Erling Smørgrav - des(at)des(dot)no

Responses

Browse pgsql-sql by date

  From Date Subject
Next Message Stephan Szabo 2009-10-09 23:06:56 Re: Existential quantifier
Previous Message Alberto Asuero Arroyo 2009-10-09 09:08:52 Re: select result into string's array