What SQL query would you use to combine two tables and return only matching rows based on a shared key?
Write a PostgreSQL query using the provided tables. Return one row for each matching pair of records.
person_code, person_name, assignment_id, and assignment_statusperson_codeperson_code, then assignment_id ascending| Column | Type | Description |
|---|---|---|
| person_idPK | INT | Unique identifier for the person |
| person_code | VARCHAR(20) | Code used to match a person to an assignment |
| person_name | VARCHAR(100) | Person's full name |
| Column | Type | Description |
|---|---|---|
| assignment_idPK | INT | Unique identifier for the assignment |
| person_code | VARCHAR(20) | Code used to match an assignment to a person |
| assignment_status | VARCHAR(30) | Current status of the assignment |