title: select condition between 3 table
body: <p>i have 3 table with name <code>city</code> and <code>state</code> and <code>project</code></p>
  
  <p>city</p>
  
  <pre><code>id_city |  name_city         
     1    |   JED
     2    |   RYD
     3    |   DMM
  </code></pre>
  
  <p>state </p>
  
  <p>column city_id foreign key with city.city_id</p>
  
  <pre><code> id_state | name_state | city_id
       1    |    JED 1   | 1(JED)
       2    |    RYD 1   | 2(RYD)
       3    |    RYD 2   | 2(RYD)
  </code></pre>
  
  <p>project</p>
  
  <p>column state_from_city_id_table_state foreign key with state .city_id</p>
  
  <pre><code>id_project | city_id | state_from_city_id_table_state
        1    |     1   |  1(JED)&gt;&gt; (JED1)     question here 
        2    |     2   |  2(RYD)&gt;&gt; (RYD 1 or2) question here 
  </code></pre>
  
  <p>now question is  i selected <code>city_id from project table</code> ... like 1 and i just want see <code>city_id from state table number 1 without number 2</code> in <code>state_id from table project</code></p>
  
  <p>like this <code>JED &gt; JED1 only i don't wanna see RYD1 and RYD2</code></p>