How to subtract the Counts of two Tables in BigQuery?

How to subtract the record counts of two BigQuery Tables

Solution:

You can simply use the count(*) queries directly

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

dan-irving

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