I use the bq command line tool to run queries, e.g:
bq
bq query "select * from table"
What if I store the query in a file
This thread offers good solution
bq query `cat my_query.sql`