I have a column in my table called data_xml that has records presented like this-
<data user_id="A" user_id_type="1" date="2019-10-31"/>
<data user_id="B" user_id_type="2" date="2020-01-30"/>
I want to be able to pull user_id_type records from the column. I tried using split_part but because the xml data doesnot have a delimiter as seen above I am not sure how to proceed.
Does anyone have a better alternative.