Using superQuery, you can execute a batch of queries — delimited by semicolons — in a single execution command.

Whether you're exploring an unfamiliar table, mass-deleting and/or creating tables, or running queries in a sequence, this capability will save you tons of time.


To run multiple queries, simply separate them with a semicolon (;)

Running multiple statements (non-sequential)

If there is no dependency between your queries — meaning one query doesn't depend on the results of the one before it — superQuery executes your queries in parallel.

Each result will appear in its own tab, as demonstrated below.


Running multiple statements (sequential)

If there is a query dependency detected, then superQuery will execute your queries in the order they are listed in your SQL Editor.

A dependency is when, for example, the second query is dependent on the first query's result. 

Check out the example below.

CREATE TABLE IF NOT EXISTS `myproject.mydataset.mytable` (
the_time TIMESTAMP,    
customer_name STRING,    
item_name STRING,    
item_id NUMERIC NOT NULL,    
price NUMERIC);

INSERT INTO `myproject.mydataset.mytable` (
the_time, customer_name, item_name, item_id, price)
'2019-08-01 12:41:11', 'John Smith' 'MacBook Pro', '1245124', 2000

SELECT * FROM `myproject.mydataset.mytable`;

Additional reading:

Scheduling a sequence of DML scripts

Did this answer your question?