title: Why can't I select one column from a subquery in MySQL?
body: <p>I have the following data:</p>
  
  <p><a href="http://i.imgur.com/e4d8M8V.png?1" rel="nofollow">http://i.imgur.com/e4d8M8V.png?1</a></p>
  
  <p>I run the following MySQL code</p>
  
  <pre><code>select distinct i.InstructorID, i.Salary
  from Instructor i
  where (i.InstructorID NOT IN (select o.InstructorID from Offering o));
  </code></pre>
  
  <p>Which gives the desired output here:</p>
  
  <p><a href="http://i.imgur.com/rkFKseX.png?1" rel="nofollow">http://i.imgur.com/rkFKseX.png?1</a></p>
  
  <p>How could I get just the salaries from this query?</p>
  
  <p>I've tried</p>
  
  <pre><code>$MySQL:&gt;select (i.Salary)
  from (select distinct i.InstructorID, i.Salary
  from Instructor i
  where (i.InstructorID NOT IN (select o.InstructorID from Offering o)));
  </code></pre>
  
  <p>as well as trying to change the first select parameter to i1.Salary or just simply (Salary), but no matter what I do I just get a syntax error</p>
  
  <pre><code>SQLException: com.mysql.jdbc.exceptions.MySQLSyntaxErrorExceptio
  </code></pre>