title: sql query to return all rows with same column value
body: <p>I have a DB like</p>
  
  <pre><code>    column_1 | column_2 | column_3
      ------------------------------
           aaa | bbb      | ccc
           xys | hkj      | fgh
           dfs | jhv      | ccc
           cfg | rty      | fgh
           iyd | olp      | ccc
           gdv | tdr      | www
  </code></pre>
  
  <p>I want to get the result such that all the rows that have the same value in <code>column_3</code> are printed out along with their <code>column_3</code> value</p>
  
  <pre><code>        column_1 | column_3
          --------------------
               aaa | ccc
               dfs | ccc
               iyd | ccc
               cfg | fgh
               xys | fgh
               gdv | www
  </code></pre>
  
  <p>I know <code>SELECT DISTINCT column_3 FROM table_name;</code> gives me all the unique names of <code>column_3</code> but how do I get all the <code>column_1</code> values that depend on <code>column_3</code>?</p>