By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
sensor_id | model_no | location_id |
---|---|---|
1 | some string | 11 |
2 | another string | 22 |
location_id | name | ST_AsText(location) | ST_X(location) | ST_Y(location) | radius |
---|---|---|---|---|---|
11 | Berlin | POINT(3 4) | 3 | 4 | 1000 |
22 | Frankfurt | POINT(5 6) | 5 | 6 | 100 |
JSON_output |
---|
{"location": {"name": "Berlin", "radius": 1000, "location": {"x": 3, "y": 4}}, "model_no": "some string", "sensor_id": 1} |
{"location": {"name": "Frankfurt", "radius": 100, "location": {"x": 5, "y": 6}}, "model_no": "another string", "sensor_id": 2} |