title: Insert values into column when the two corresponding column values are not there
body: <p>I am creating a table with having user profiles associated with various events. Various variables of user profile change at various intervals ranging from daily to more than a year. Hence, once the user is associated with an event, his profile cannot change for that event.</p>
  <p>While Inserting the values into the table through a Select query I need to ensure that there is no more than one record for one user ID and Event ID. How can I achieve this in the best optimal way? Thank You in advance.</p>
  <p>e.g.</p>
  <div class="s-table-container">
  <table class="s-table">
  <thead>
  <tr>
  <th>event_id</th>
  <th>user_id</th>
  <th>age</th>
  <th>gender</th>
  </tr>
  </thead>
  <tbody>
  <tr>
  <td>abc</td>
  <td>1</td>
  <td>24</td>
  <td>M</td>
  </tr>
  <tr>
  <td>xyz</td>
  <td>5</td>
  <td>31</td>
  <td>F</td>
  </tr>
  <tr>
  <td>xyz</td>
  <td>5</td>
  <td>31</td>
  <td>F</td>
  </tr>
  <tr>
  <td>abc</td>
  <td>5</td>
  <td>31</td>
  <td>F</td>
  </tr>
  </tbody>
  </table>
  </div>
  <p>In the above table, the event_id = xyz and user_id = 5 has been entered twice. I need to ensure that the these type of value do not get inserted again from the query that I am retreiving the data.</p>