title: Using variables in BigQuery view definition
body: <p>I have a simple query that runs successfully, but when I introduce a variable into the query, I am unable to save a view using that query. For example:</p>
  
  <pre><code>SELECT * FROM mytable WHERE color = 'red';
  </code></pre>
  
  <p>This query runs fine. Then:</p>
  
  <pre><code>DECLARE color STRING DEFAULT 'red';
  SELECT * FROM mytable WHERE color = color;
  </code></pre>
  
  <p>This query also runs fine. Then in the BigQuery UI I click to "Save view", but I get an error saying Unexpected keyword DECLARE. Why is that?</p>