title: Select last record of each group as a materialised view bq
body: <p>Is it possible to select the record with highest version of each group and store it as a materialised view in bigquery?</p>
  <p>Source table</p>
  <pre><code>version name value
  1       a    100
  1       b    200
  1       c    300
  2       c    400
  
  </code></pre>
  <p>I only want to get the last record of each group (group by version), so the output should be like this:</p>
  <pre><code>version name value
  1       a    100
  1       b    200
  2       c    400
  
  </code></pre>
  <p>Tried with answer from: <a href="https://stackoverflow.com/a/1313293/5839247">https://stackoverflow.com/a/1313293/5839247</a>, got an error:
  <code>Materialized views do not support analytic functions or WITH OFFSET.</code>
  Tried with the method from this answer: <a href="https://stackoverflow.com/a/7745635/5839247">https://stackoverflow.com/a/7745635/5839247</a>, got <code>Unsupported operator in materialized view: Join.</code></p>
  <p>Documentation: <a href="https://cloud.google.com/bigquery/docs/materialized-views#supported_mvs" rel="nofollow noreferrer">https://cloud.google.com/bigquery/docs/materialized-views#supported_mvs</a></p>