From: Paul Linehan [mailto:linehanp@tcd.ie] Sent: Friday, August 29, 2014 10:08 AM To: Ken Benson Cc: pgsql-novice@postgresql.org Subject: Re: [NOVICE] Join three tables and specify criteria... I know this should be easy!
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')