Postgresql – Parsing key-value pairs, selecting based on value, and creating new column with SQL
I have a my_table like this. Col2 is a string type: | Col1 | Col2 | |--------------|------------------------| | some_string |{key1:0, key2:1, key3:0}| | some_string |{key1:0, key2:0, key3:0}| | some_string |{key1:1, key2:2, key3:3}| | some_string |{key1:1, key2:1, key3:0}| I would like…