I have a query which gives me timestamps in the below format:
2020-10-25 09:58:21.479 UTC
2020-10-25 10:18:22.737105 UTC
What I would like to do is calculate the difference between the two times and displayed in mm:ss format? For my example, the output would be 20:01
SELECT
MIN(ts) AS session_start_time,
MAX(ts) AS session_end_time,
FROM(
SELECT
event_date AS date,
user_pseudo_id AS user_id,
event_name,
key,
value,
TIMESTAMP_MICROS(event_timestamp) AS ts,
FROM
`table _name`,
UNNEST (event_params) AS event_params
WHERE
_TABLE_SUFFIX BETWEEN "20201025"
AND FORMAT_DATE('%Y%m%d', DATE_SUB(CURRENT_DATE(), INTERVAL 1 DAY))
AND event_name != 'view_search_results'
AND user_pseudo_id = '4B132ED3654C4293B9820D8203282B0D'
ORDER BY ts ASC