title: Postgresql: How do I join same table with where condition
body: <p>I have one table <code>statistic</code>. The table has <code>step_index</code>, for example <code>1</code>, <code>2</code>, <code>3</code> and <code>4</code>. I need make query add <code>week2</code> and <code>total_request2</code> where week is <code>37</code> and join self table with same <code>step_index</code>.</p>
  <p>Example:</p>
  <pre><code>step_index|type    |year|week|total_request|
  ----------+--------+----+----+-------------+
           1|Blasting|2021|  38|            1|
           2|Blasting|2021|  38|            1|
           3|Blasting|2021|  38|            1|
           4|Blasting|2021|  38|            1|
           1|Blasting|2021|  37|            6|
           2|Blasting|2021|  37|            6|
           3|Blasting|2021|  37|            6|
           4|Blasting|2021|  37|            6|
  </code></pre>
  <p>The result should be:</p>
  <pre><code>step_index|type    |year|week|total_request|week2|total_request2|
  ----------+--------+----+----+-------------+-----+--------------+
           1|Blasting|2021|  38|            1|   37|             6|
           2|Blasting|2021|  38|            1|   37|             6|
           3|Blasting|2021|  38|            1|   37|             6|
           4|Blasting|2021|  38|            1|   37|             6|
  </code></pre>
  <p>I tried inner join and with clause, but not result <code>week2</code> and <code>total_request2</code>.</p>