Check out example codes for "firebase bigquery cloud message". It will help you in understanding the concepts better.

Code Example 1

SELECT *
FROM `<project_name>.firebase_messaging.data`
WHERE
   _PARTITIONTIME = TIMESTAMP('<date as YYYY-MM-DD>')
   AND message_id = '<your message id>'
   AND instance_id = '<your instance id>'
ORDER BY event_timestamp;

Learn ReactJs, React Native from akashmittal.com