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

Поиск
Список
Период
Сортировка
От Paul Linehan
Тема Re: Join three tables and specify criteria... I know this should be easy!
Дата
Msg-id CAF4RT5TbZzAAQ=7AWVGa=yLYvMW1fddnrft9+t7SK0okzi08-w@mail.gmail.com
обсуждение исходный текст
Ответ на Re: Join three tables and specify criteria... I know this should be easy!  (Ken Benson <Ken@infowerks.com>)
Ответы Re: Join three tables and specify criteria... I know this should be easy!  (Ken Benson <Ken@infowerks.com>)
Список pgsql-novice



2014-08-29 17:59 GMT+01:00 Ken Benson <Ken@infowerks.com>:


Hi Ken, and thanks for your input,

but there's no u.user_language field - user_language is a
joining table - otherwise, I'd have to have a record in the
user table for each language spoken which would not
be very normalised (or elegant :-) ).

Paul...


> SELECT DISTINCT u.user_id
> FROM user u
> JOIN user_language ul
> ON u.user_id = ul.ul_user_id
> JOIN language l
> ON ul.ul_iso_code = l.iso_code
> WHERE u.user_language IN ('EN','DE')



--
 
linehanp@tcd.ie
 
Mob: 00 353 86 864 5772

В списке pgsql-novice по дате отправления:

Предыдущее
От: Naresh Kumar
Дата:
Сообщение: Re: Join three tables and specify criteria... I know this should be easy!
Следующее
От: Ken Benson
Дата:
Сообщение: Re: Join three tables and specify criteria... I know this should be easy!