title: How to generate multiple rows based on a single record when join a table?
body: <p>I have two tables <code>User</code> and <code>Post</code>. User has many posts, so <code>user_id</code> is the foreign key.</p>
  <p>User:</p>
  <pre><code>id | name | base 
  ---+------+-------
  1  | User1|  5
  </code></pre>
  <p>Post:</p>
  <pre><code>id | content |  min | max | user_id
  ---+---------+------+-----+--------
  1  | Test    |   8  |  10 | 1
  2  | Test2   |   10 |  15 | 1
  </code></pre>
  <p>There could also have other table to join(Which is not show in the example). In general, I can joins the posts and other tables:</p>
  <pre><code>SELECT users.id, users.content, posts.min, posts.max, posts.content, ...
  FROM users
  JOIN table_1
  ON condition_1
  JOIN table_2
  ON condition_2
  JOIN posts
  ON users.id = posts.user_id
  </code></pre>
  <p>Now I want to get users, but join posts and extend the posts based on <code>user.base</code>, which will seperate id=1 post into two records. So finally I want to get 3 records:</p>
  <pre><code>user.id | user.name | user.base | post.id | post.content | post.min | post.max | post.user_id
  --------+-----------+-----------+---------+--------------+----------+----------+----------
  1       | User1     | 5         | 1       | Test         | 5        | 8        | 1
  1       | User1     | 5         | 1       | Test         | 8        | 10       | 1
  1       | User1     | 5         | 2       | Test2        | 10       | 15       | 1
  </code></pre>
  <p>Is it possible to get the result via SQL?</p>