Your question is SQL: Parents With Siblings. Start with the requirements and the three tables on the right.
Run and submit as often as you like. When you're ready, talk me through your approach or go straight to the code.
Janus Henderson Investors maintains employee family relationships in a student and parent registry. Write a PostgreSQL query to list only parents associated with at least two distinct students, treating those students as siblings.
parent, student_parent, and student.parent_id ascending.| Column | Type | Description |
|---|---|---|
| parent_idPK | INT | Unique parent identifier |
| parent_name | VARCHAR(100) | Parent's full name |
| VARCHAR(255) | Parent email address |
| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Unique student identifier |
| student_name | VARCHAR(100) | Student's full name |
| Column | Type | Description |
|---|---|---|
| student_idPK | INT | Student identifier in the relationship |
| parent_idPK | INT | Parent identifier in the relationship |
| relationship_type | VARCHAR(30) | Relationship classification |