I am having trouble getting the data into a single table from multiple tables using PostgreSQL. I have the following two tables:
schedule.event:
| starttime | endtime | hash |
| 1612716238 | 1612716266 | xyz |
| 1612716912 | 1612718972 | abc |
schedule.resource:
| name | type | hash |
| sat1 | satellite | xyz |
| station1 | station | xyz |
| modem1 | modem | xyz |
| sat2 | satellite | abc |
| station1 | station | abc |
| modem1 | modem | abc |
I want to get the data in the following table format:
| starttime | endtime | satellite | station | modem |
| 1612716238 | 1612716266 | sat1 | station1 | modem1 |
| 1612716912 | 1612718972 | sat2 | station1 | modem1 |
I am having trouble writing the PostgreSql query to do that.
Thanks