title: FILEMAKER SQL - Fetch column2 from records with distinct column1
body: <p>How do I find a distinct set of records based upon one field while returning a different field from those records?</p>
  
  <pre><code>ExecuteSQL ( "SELECT DISTINCT account FROM Albums2"; ""; "" )
  </code></pre>
  
  <p>How do I get another field returned in this type of query?</p>
  
  <p>My goal is fetch 1 record from 1 instance of each account in the list. I am going to populate a global with the id's from the records so that the accounts show in a portal. Then I want to select an account so that all records from the account will show in another portal.</p>
  
  <p>Dan's answer below works perfectly:</p>
  
  <pre><code>SELECT account, MAX(id) FROM Albums2 GROUP BY account
  </code></pre>