Как насчет этого:
(вы можете агрегировать по массивам, чтобы упростить сравнение, но тогда вам понадобится дезагрегировать, чтобы попасть в столбцы)
CREATE TEMPORARY FUNCTION compareCols( a ANY TYPE , b ANY TYPE )
AS ((
SELECT STRUCT(arr[OFFSET(0)] AS col1_ch, arr[OFFSET(1)] AS col2_ch, arr[OFFSET(2)] AS col3_ch, arr[OFFSET(3)] AS col4_ch)
FROM (
SELECT ARRAY_AGG(IF(av!=bv, bv, null) ORDER BY i) arr
FROM UNNEST(a) av WITH OFFSET i
JOIN UNNEST(b) bv WITH OFFSET i
USING (i)
)
));
WITH data AS (
SELECT title, DATE(datehour) date
, SUM(IF(EXTRACT(HOUR FROM datehour)=7, views, null)) col1
, SUM(IF(EXTRACT(HOUR FROM datehour)=8, views, null)) col2
, SUM(IF(EXTRACT(HOUR FROM datehour)=9, views, null)) col3
, SUM(IF(EXTRACT(HOUR FROM datehour)=10, views, null)) col4
FROM `bigquery-public-data.wikipedia.pageviews_2020`
WHERE wiki='en'
AND title LIKE 'Presi%'
AND views > 0
AND DATE(datehour) BETWEEN '2020-01-10' AND '2020-01-11'
GROUP BY title, date
HAVING col1*col2*col3*col4>53500
), data1 AS (
SELECT *
FROM data
WHERE date = '2020-01-10'
ORDER BY col1+col2+col3+col4 DESC
), data2 AS (
SELECT *
FROM data
WHERE date = '2020-01-11'
)
SELECT data1, compareCols([data1.col1, data1.col2, data1.col3, data1.col4], [data2.col1, data2.col2, data2.col3, data2.col4]) changes
FROM data1
JOIN data2
USING(title)