You have a column in a data frame that contains strings like [1,2,3,4,5]; convert it into an average integer value.
Write a SQL query that reads the string, extracts the numbers inside the brackets, and returns the average as an integer for each row.
row_id, average_valuerow_id| Column | Type | Description |
|---|---|---|
| row_idPK | INT | Unique row identifier |
| array_string | VARCHAR(100) | String containing bracketed comma-separated integers |