I have a table that includes some information about each time a user uses mobile or web app ie
| id | platform |
|---|---|
| 1 | web |
| 1 | mobile |
| 2 | web |
| 2 | web |
I want to join another table with this table which says what each user uses as a phone_model
| id | phone_model |
|---|---|
| 1 | iphone |
| 2 | android |
But I want to conditionally join these so that only the mobile entries show the phone_model and the web row to be kept empty, ie only join that information in cases where platform = 'mobile'
| id | platform | phone_model |
|---|---|---|
| 1 | web | |
| 1 | mobile | Iphone |
| 2 | web | |
| 2 | web |
How can I do this?