title: SELECT DISTINCT one column but return all
body: <p>I have a query like this:</p>
  
  <pre><code>$sql_place = "SELECT * FROM place
  INNER JOIN join_appointment_place 
  ON join_appointment_place.id_place = place.id_place
  INNER JOIN join_event_appointment 
  ON join_appointment_place.id_appointment = join_event_appointment.id_appointment
  WHERE join_event_appointment.id_event = " . $EVENT_ID . "
  ORDER BY place.title, place.category";
  </code></pre>
  
  <p>The problem is that I need to return all the places with different <code>titles</code>. So I should use a <code>DISTINCT</code>. But how do I select the <code>DISTINCT</code> <code>title</code> and at the same time return all the other values?</p>
  
  <pre><code>  $sql_place = "SELECT 
    DISTINCT 
    place.id_place, 
    place.avatar, 
    place.category, 
    place.title, 
    place.description, 
    place.address, 
    place.latitude,
    place.longitude, 
    place.email, 
    place.web, 
    place.shared FROM place
    INNER JOIN join_appointment_place 
    ON join_appointment_place.id_place = place.id_place
    INNER JOIN join_event_appointment 
    ON join_appointment_place.id_appointment = join_event_appointment.id_appointment
    WHERE join_event_appointment.id_event = " . $EVENT_ID . "
    ORDER BY place.title, place.category";
  </code></pre>
  
  <p>The above is what I tried. But I am worried that is applying the DISTINCT not only to the <code>title</code>, but to each selected column and this is not what I am looking for.
  Thanks for any help :)</p>