title: Dynamic Column Names in BigQuery SQL Query
body: <p>I have a BigQuery table in which every row is a visit of a user in a country. The schema is something like this:</p>
  
  <pre><code>UserID   |   Place   |   StartDate   |   EndDate   | etc ...
  ---------------------------------------------------------------
  134      |  Paris    |   234687432   |   23648949  | etc ...
  153      |  Bangkok  |   289374897   |   2348709   | etc ...
  134      |  Paris    |   9287324892  |   3435438   | etc ...
  </code></pre>
  
  <p>The values of the "Place" columns can be no more than tens of options, but I don't know them all in advance.</p>
  
  <p>I want to query this table so that in the resulted table the columns are named as all the possibilities of the Place column, and the values are the total number of visits per user in this place. 
  The end result should look like this:</p>
  
  <pre><code>UserID | Paris | Bangkok | Rome | London | Rivendell | Alderaan 
  ----------------------------------------------------------------
  134    |  2    |  0      |  0   |  0     |  0        |  0 
  153    |  0    |  1      |  0   |  0     |  0        |  0
  </code></pre>
  
  <p>I guess I can select all the possible values of "Place" with <code>SELECT DISTINCT</code> but how can I achieve this structure of result table?</p>
  
  <p>Thanks</p>