Re: SQL question - problem with INTERSECT - Mailing list pgsql-general

From Igor Roboul
Subject Re: SQL question - problem with INTERSECT
Date
Msg-id 20001101075804.A10542@linux.rainbow
Whole thread Raw
In response to SQL question - problem with INTERSECT  ("Keith L. Musser" <kmusser@idisys.com>)
List pgsql-general
On Mon, Oct 30, 2000 at 07:59:06PM -0500, Keith L. Musser wrote:
> "(SELECT messages.msgid FROM messages, subject_index WHERE
> ((subject_index.word='Hello' or subject_index.word='There') and
> (subject_index.msgid = messages.msgid))
> GROUP BY messages.msgid HAVING count(messages.msgid)=2)
> INTERSECT
> (SELECT messages.msgid FROM messages, author_index WHERE
> ((author_index.word='Jim' or author_index.word='Jones') and
> (author_index.msgid = messages.msgid))
> GROUP BY messages.msgid HAVING count(messages.msgid)=2);"
Try removing first "GROUP BY messages.msgid HAVING count(messages.msgid)=2)"

--
Igor Roboul, Unix System Administrator & Programmer @ sanatorium "Raduga",
Sochi, Russia
http://www.brainbench.com/transcript.jsp?pid=304744

pgsql-general by date:

Previous
From: KuroiNeko
Date:
Subject: Re: Query caching
Next
From: Yann Ramin
Date:
Subject: Case insensitive LIKE queries