title: How to show name of position from second table based on number of rows in first table?
body: <p>I have two tables "Employees" and "Positions"</p>
  
  <p>I want to write a query that show the name of the Position that appears least in table "Employees" I have foreign key "ID_of_Position" in "Employees".
  I came up with something like this, but it might not work:</p>
  
  <pre><code>SELECT Employees.ID_of_Position, Positions.ID_of_Position, Positions.Name_of_Position  
  FROM Positions
  WHERE Employees.ID_of_Position in (SELECT ID_of_Position
                                     FROM Employees
                                     GROUP BY ID_of_Position
                                     HAVING COUNT(ID_of_Position
                                    )=1)
  INNER JOIN Employees ON Positions.ID_of_Position = Employees.ID_of_Position;
  </code></pre>