From: | Paul Linehan <linehanp(at)tcd(dot)ie> |
---|---|
To: | Naresh Kumar <narain337(at)gmail(dot)com> |
Cc: | Chuck Roberts <croberts(at)gilsongraphics(dot)com>, "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 17:35:41 |
Message-ID: | CAF4RT5S4g8uaSk-AtEhLhMp1KSaDPbRizLf4LxwVGt67eKvoMQ@mail.gmail.com |
Views: | Raw Message | Whole Thread | Download mbox | Resend email |
Thread: | |
Lists: | pgsql-novice |
2014-08-29 18:05 GMT+01:00 Naresh Kumar <narain337(at)gmail(dot)com>:
Hi Naresh, and thanks for that,
> SELECT ul_user_id, user_name
> FROM user_language ul
> INNER JOIN language l ON ul.ul_iso_code = l.iso_code
> INNER JOIN user u ON u.user_id = ul.ul_user_id
> where l.language_name IN ('English', 'German')
> group by ul_user_id, user_name having COUNT(*) > 1
This gives the correct answer - however, I am just wondering what will I
do if I wish to specify just 'EN' say, or just 'DE'? Sometimes one
language is sufficient and we only need people who speak one
language - your query won't pick them up. Any ideas?
(My apologies BTW for not having included that in my original
spec :-) ).
Paul...
> -Naresh
--
linehanp(at)tcd(dot)ie
Mob: 00 353 86 864 5772
From | Date | Subject | |
---|---|---|---|
Next Message | Jude DaShiell | 2014-08-29 17:39:12 | showing weekdays of dates |
Previous Message | Ken Benson | 2014-08-29 17:11:47 | Re: Join three tables and specify criteria... I know this should be easy! |