title: SQL: Selecting data from another table using foreign keys
body: <p>I'm newbie in SQL and for purpose of learning I'm trying to make some queries in SQL. So i made these two tables:</p>
  
  <pre><code>account(id, email, password)
  address(id, city, street, c_id(foreign key for account))
  </code></pre>
  
  <p>Now I would like to select all emails given a city. Bellow what i tried.</p>
  
  <pre><code>SELECT email
  FROM account
  WHERE id=(SELECT c_id
            FROM address
            WHERE city='new york');
  </code></pre>
  
  <p>This query is not working!</p>