title: How to SELECT COUNT(DISTINCT) and WHERE conditional on Ms.Access Query
body: <p>I just wanted to simply count using where conditional and yet this query ask me for parameter instead of automatically execute the query</p>
  
  <pre><code>SELECT COUNT(ActDiscDischargingPort) from(
  SELECT DISTINCT ActDiscDischargingPort FROM SelisihLoadVSActualLoadTable) WHERE SchLoadVessel LIKE "XB24 - MV. MEMPHIS" AND SchLoadVoyageNo LIKE "0019";
  </code></pre>
  
  <p>What is the proper way of writing this query?</p>
  
  <p>Found the answer, turn out the query has to be like this </p>
  
  <pre><code>SELECT COUNT(ActDiscDischargingPort) from ( SELECT DISTINCT ActDiscDischargingPort FROM SelisihLoadVSActualLoadTable WHERE SchLoadVoyageNo LIKE "XB24 - MV. MEMPHIS" AND SchLoadVessel LIKE "0019" )
  </code></pre>