21 Sep 18 · dan-irving · #bigquery ·   Bookmark   ×

How to subtract the Counts of two Tables in BigQuery?

How to subtract the record counts of two BigQuery Tables


You can simply use the count(*) queries directly

SELECT (SELECT COUNT(*) c FROM `publicdata.samples.natality`) 
  - (SELECT COUNT(*) c FROM `publicdata.samples.shakespeare`);


posted on 21 Sep 18

Enjoy great content like this and a lot more !

Signup for a free account to write a post / comment / upvote posts. Its simple and takes less than 5 seconds