By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 7
| id | name | thing_id | c_id | status | etag | last_modified | size | status_1_date |
|---|---|---|---|---|---|---|---|---|
| 1 | protocol://full/path/to/thing/thing_1.file1 | thing_1 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:01 |
| 2 | somethin gelse | thing_1 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:01 |
| 3 | protocol://full/path/to/thing/thing_1.file2 | thing_1 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:02 |
| 4 | protocol://full/path/to/thing/thing_2.file1 | thing_2 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:03 |
| 5 | protocol://full/path/to/thing/thing_2.file2 | thing_2 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:04 |
| 6 | protocol://full/path/to/thing/thing_2.file3 | thing_2 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:05 |
| 7 | protocol://full/path/to/thing/thing_3.file1 | thing_3 | c_id | status_1 | etag | 1111 | 200 | 2023-09-29 09:00:06 |
SELECT 7
| id | name | thing_id | c_id | status | etag | last_modified | size | status_1_date | id |
|---|---|---|---|---|---|---|---|---|---|
| 1 | protocol://full/path/to/thing/thing_1.file1 | thing_1 | c_id | status_2 | etag | 1111 | 200 | 2023-09-29 09:00:01 | 1 |
| 3 | protocol://full/path/to/thing/thing_1.file2 | thing_1 | c_id | status_2 | etag | 1111 | 200 | 2023-09-29 09:00:02 | 3 |
UPDATE 2