title: how to select data that have the same value with sql?
body: <p>I have a table with three columns, <code>id</code>, <code>name</code>, and <code>value</code>, as shown below.  I want to count the average where the <code>id</code> and <code>value</code> columns are the same, how can I do this?</p>
  
  <pre><code>+----+--------+-------+
  | id |  name  | value |
  +----+--------+-------+
  | 2  | rahmat |   3   |
  | 2  | olive  |   5   |
  | 3  | sari   |   3   |
  | 3  | ryan   |   2   |
  | 1  | zaki   |   1   |
  +----+--------+-------+
  </code></pre>