I have a table with 2 columns, session_id and json_column. Each row is at session level and json_column has all the event name <> event time stamp a user took during that session. event names are not repeated so it will have one event time stamp for each event name. For example lets assume the table has only 2 rows and json_column value will look like this for those rows,
row 1: {
“app_close”: 104,
“video_playback”: 110,
“video_start”: 541
“video_end”: 500
}
row 2: {
“video_start”: 541
“did_request_playback”: 110,
“video_end”: 539
}
The expected output is,
Event Name : # of sessions -- column name
video_start: 2
app_close: 1
video_playback: 1
did_request_playback: 1
video_end: 2
Can some help me with SQL query for this please?