When doing some aggregations to compute the amount of slots per unit of time (like in the queries: query_slots_per_second.sql & slots_by_second.sql), then the following filter should be added in the WHERE condition:
For script jobs, the parent job also reports the total slot usage from its children jobs. To avoid double counting, use WHERE statement_type != "SCRIPT" to exclude the parent job.
When doing some aggregations to compute the amount of slots per unit of time (like in the queries: query_slots_per_second.sql & slots_by_second.sql), then the following filter should be added in the WHERE condition:
statement_type != 'SCRIPT'
Otherwise, the amount of slots will be counted twice in some situations. This is mentioned in this doc https://cloud.google.com/bigquery/docs/information-schema-jobs-timeline :