Q:

postgresql select multiple values

I have two tables:
Table1 'jobs'
num  |  job1  | job2
--------------------
 1   |    14  |   12 
 2   |    23  |   15
 3   |    3   |   12
 4   |    21  |   3
 5   |    6   |   8 

Table2 'users'  
id  |  name
------------
3   | name1
6   | name2
12  | name3
14  | name4
15  | name5

I need to have query which shows:
num  |  job1     | job2
--------------------------
 1   |    name4  |   name3 
 2   |    name6  |   name5

Thanks already

A:

SELECT j.num, u1.name, u2.name 
FROM jobs j, users u1, users u2 
WHERE j.job1 = u1.id
  AND j.job2 = u2.id

