add remove split language show hidden hide
db<>fiddle
donate feedback about
By using db<>fiddle, you agree to license everything you submit by Creative Commons CC0.
CREATE TABLE
INSERT 0 16
row_number name thing_id c_id status status_1_date
1 protocol://full/path/to/thing/thing_1.file1 thing_1 c_id status_1 2023-09-29 09:00:01
2 protocol://full/path/to/thing/thing_1.file2 thing_1 c_id status_1 2023-09-29 09:00:02
3 protocol://full/path/to/thing/thing_2.file5 thing_2 c_id status_1 2023-09-29 09:00:02.5
4 protocol://something else thing_1 c_id status_1 2023-09-29 09:00:02.8
5 protocol://full/path/to/thing/thing_2.file1 thing_2 c_id status_1 2023-09-29 09:00:03
6 protocol://full/path/to/thing/thing_2.file2 thing_2 c_id status_1 2023-09-29 09:00:04
7 protocol://full/path/to/thing/thing_2.file3 thing_2 c_id status_1 2023-09-29 09:00:05
8 protocol://full/path/to/thing/thing_2.file4 thing_2 different status_1 2023-09-29 09:00:05
9 protocol://full/path/to/thing/thing_3.file1 thing_3 c_id status_1 2023-09-29 09:00:06
10 protocol://full/path/to/thing/thing_4.file1 thing_4 c_id status_1 2023-09-29 09:00:06.1
11 protocol://full/path/to/thing/thing_3.file2 thing_3 c_id status_1 2023-09-29 09:00:06.2
12 protocol://full/path/to/thing/thing_4.file2 thing_4 c_id status_1 2023-09-29 09:00:06.3
13 protocol://full/path/to/thing/thing_5.file1 thing_5 c_id status_1 2023-09-29 09:00:06.4
14 protocol://full/path/to/thing/thing_5.file2 thing_5 c_id status_1 2023-09-29 09:00:06.5
15 protocol://full/path/to/thing/thing_5.file3 thing_5 c_id status_1 2023-09-29 09:00:06.6
16 protocol://full/path/to/thing/thing_6.file1 thing_6 c_id status_1 2023-09-29 09:00:06.7
SELECT 16
name thing_id
protocol://full/path/to/thing/thing_1.file1 thing_1
protocol://full/path/to/thing/thing_1.file2 thing_1
protocol://full/path/to/thing/thing_2.file5 thing_2
SELECT 3
name thing_id c_id status status_1_date
protocol://full/path/to/thing/thing_1.file1 thing_1 c_id status_2 2023-09-29 09:00:01
protocol://full/path/to/thing/thing_1.file2 thing_1 c_id status_2 2023-09-29 09:00:02
protocol://full/path/to/thing/thing_2.file5 thing_2 c_id status_2 2023-09-29 09:00:02.5
protocol://full/path/to/thing/thing_2.file1 thing_2 c_id status_2 2023-09-29 09:00:03
protocol://full/path/to/thing/thing_2.file2 thing_2 c_id status_2 2023-09-29 09:00:04
protocol://full/path/to/thing/thing_2.file3 thing_2 c_id status_2 2023-09-29 09:00:05
UPDATE 6
row_number name thing_id c_id status status_1_date
1 protocol://full/path/to/thing/thing_1.file1 thing_1 c_id status_2 2023-09-29 09:00:01
2 protocol://full/path/to/thing/thing_1.file2 thing_1 c_id status_2 2023-09-29 09:00:02
3 protocol://full/path/to/thing/thing_2.file5 thing_2 c_id status_2 2023-09-29 09:00:02.5
4 protocol://something else thing_1 c_id status_1 2023-09-29 09:00:02.8
5 protocol://full/path/to/thing/thing_2.file1 thing_2 c_id status_2 2023-09-29 09:00:03
6 protocol://full/path/to/thing/thing_2.file2 thing_2 c_id status_2 2023-09-29 09:00:04
7 protocol://full/path/to/thing/thing_2.file3 thing_2 c_id status_2 2023-09-29 09:00:05
8 protocol://full/path/to/thing/thing_2.file4 thing_2 different status_1 2023-09-29 09:00:05
9 protocol://full/path/to/thing/thing_3.file1 thing_3 c_id status_1 2023-09-29 09:00:06
10 protocol://full/path/to/thing/thing_4.file1 thing_4 c_id status_1 2023-09-29 09:00:06.1
11 protocol://full/path/to/thing/thing_3.file2 thing_3 c_id status_1 2023-09-29 09:00:06.2
12 protocol://full/path/to/thing/thing_4.file2 thing_4 c_id status_1 2023-09-29 09:00:06.3
13 protocol://full/path/to/thing/thing_5.file1 thing_5 c_id status_1 2023-09-29 09:00:06.4
14 protocol://full/path/to/thing/thing_5.file2 thing_5 c_id status_1 2023-09-29 09:00:06.5
15 protocol://full/path/to/thing/thing_5.file3 thing_5 c_id status_1 2023-09-29 09:00:06.6
16 protocol://full/path/to/thing/thing_6.file1 thing_6 c_id status_1 2023-09-29 09:00:06.7
SELECT 16