title: Can somebody help me to find the problem? MySQL/sub query
body: <p>I'm trying to insert a 'rank' data derived by users' point. But every time I insert using sub query, it returns NULL value.</p>
  
  <pre><code>create table rank_info(
  rank_num INT,
  min_point INT,
  max_point INT,
  primary key(rank_num)
  );
  
  
  
  create table user(
      num INT,
      name varchar(45),
      point INT,
      user_rank INT,
      primary key(num),
      foreign key(user_rank) references rank_info(rank_num)
  );
  
      insert into rank_info values (1, 200, 300);
  insert into rank_info values (2, 100, 199);
  insert into rank_info values (3, 0, 99);
  insert into user values(1, 'jake', 150, 
  (select rank_num from (
  (select rank_num from rank_info, user
   where  user.point between min_point and max_point))
   a ));
  </code></pre>
  
  <p>&lt;&lt; This is where I'm stuck at.
  Thank you, always.</p>