title: Access delete query with an inner join and subquery
body: <p>I am trying to run a delete query that contains a subquery and an inner join and get the error</p>
  <p><em>Query must have at least one destination field.</em></p>
  <p>I have read elsewhere that you must use either of the following.</p>
  <ul>
  <li>DISTINCTROW</li>
  <li>WHERE EXISTS</li>
  </ul>
  <p>But I still get the error message. I have read <a href="https://stackoverflow.com/questions/5585732/how-to-delete-in-ms-access-when-using-joins">How to delete in MS Access when using JOIN&#39;s?</a> and <a href="https://stackoverflow.com/questions/23228073/ms-access-delete-query-syntax-combined-with-inner-join-problems">MS ACCESS delete query syntax combined with inner join problems</a> but can't get it to work.</p>
  <p>Here is my query.</p>
  <pre class="lang-sql prettyprint-override"><code>DELETE FROM tblUp 
  WHERE NOT EXISTS (
      SELECT tblUp.request_id, 
             tblUp.gid, 
             MAX(tblUp.savings_year) AS MaxOfsavings_year, 
             LAST(tblUp.savings_month) AS LastOfsavings_month
      FROM tblUp 
      INNER JOIN tbl_w ON tblUp.request_id = tblW.id
      GROUP BY tblUp.request_id, 
               tblUp.gid, 
               tblW.Cde
      HAVING (((tblW.Cde)=&quot;ML&quot;))
      ORDER BY tblUp.request_id, 
               tblUp.gid,
               MAX(tblUp.savings_year),
               LAST(tblUp.savings_month)
  )
  </code></pre>