Re: Join three tables and specify criteria... I know this should be easy!

From: Paul Linehan <linehanp(at)tcd(dot)ie>
To: Ken Benson <Ken(at)infowerks(dot)com>
Cc: "pgsql-novice(at)postgresql(dot)org" <pgsql-novice(at)postgresql(dot)org>
Subject: Re: Join three tables and specify criteria... I know this should be easy!
Date: 2014-08-29 18:09:16
Message-ID: CAF4RT5ROpWDrEB15yUYT-DKjf5jMSkokt2Bxd9xxJnn6NqTWHw@mail.gmail.com
Views: Raw Message | Whole Thread | Download mbox | Resend email
Thread:
Lists: pgsql-novice

Hi Ken,

> I thought the user_id is all you wanted …

> But - you only want the id/name for a person that speaks ALL of the
languages specified?
> Or any user that speaks ANY of the specified languages?
> Or Id/name/languages spoken?
> What is the exact output you're looking for?

My apologies for not having been totally clear from
the outset.

What I would like is the user_id (user_name also being
in the the user table is trivial) of all users who speak
the specified language(s).

I.e. if the request is for 'EN' and 'DE', then in the SQL DDL and DML
that I gave, then I want is Sandor's id (and name). If I specify only
English, the it should give me Sandor's and Gabor's id (and name).

For the langauge or languages input (IN ('EN', 'DE'...)) - even if
there's only one (IN ('EN')) - i.e. Naresh's COUNT(*) > 1 won't
be correct, I would like the id (and name) of those who speak
that/those language(s).

I hope that this clarifies the situation?

Paul...

--

linehanp(at)tcd(dot)ie

Mob: 00 353 86 864 5772

In response to

Browse pgsql-novice by date

  From Date Subject
Next Message Kevin Grittner 2014-08-29 18:13:01 Re: Join three tables and specify criteria... I know this should be easy!
Previous Message Csányi Pál 2014-08-29 17:52:14 Re: showing weekdays of dates