Ниже для BigQuery Standard SQL
#standardSQL
WITH `project.dataset.user_notes` AS (
SELECT * FROM `project.dataset.user1_notes` UNION ALL
SELECT * FROM `project.dataset.user2_notes`
), `project.dataset.user_note_timeline` AS (
SELECT * FROM `project.dataset.user1_note_timeline` UNION ALL
SELECT * FROM `project.dataset.user2_note_timeline`
)
SELECT note_id, note_created_at, likes_count, text
FROM (
SELECT note_id, ARRAY_AGG(STRUCT(note_created_at, likes_count, created_at) ORDER BY created_at DESC LIMIT 1)[OFFSET(0)].*
FROM `project.dataset.user_note_timeline`
GROUP BY note_id
ORDER BY likes_count DESC, note_created_at
LIMIT 2
) t
JOIN `project.dataset.user_notes` n
ON note_id = id