Is this what you meant? A join? Note: "problemname" and "areaname" are field aliases for your result set, because both fields originally have the same name "name".
A few comments though. Two fundamentally different types of things should, if at all possible, not have the same name. So, "problem.name" and "area.name" are fine, they refer to a similar things in different tables. But "engineer.engineer" and "complaints.engineer" are very different! The first is a name, the second is an id field. Try to adopt a naming convention for your id fields and others instead. For example:
- problem: id, name
- area: id, name
- engineer: id, name
- complaints: id, problemid, areaid, engineerid,...
Some people don't like things like "id" and "name" in tables, and would want you to use "problem_id" and "problem_name". That's fine too. As long as you're consistent.
Furthermore, watch out with names like "date", "time", and perhaps also "status". In some databases they are reserved words, and to prevent problems you would always have to quote these field names (which leads you straight into the snake pit of case sensitivity if you don't watch out). Rather avoid them if you can.
- Peter