Ok, I think that I haven't explain myself.
In table "work_machine" I have:
workID | machineID | hours
A | M1 | 1
B | M2 | 3
B | M1 | 5
Now I would like to know how to make the query to obtain the data in the format:
work | machine1 | machine2
A | 1 | 0
B | 3 | 5
Any idea?