title: Compare two values in a row
body: <pre><code>select event_slots.id as event_slot_id, u.first_name, u.id AS user_id,
  
  sum(case when next_round = 1 then 1 else 0 end) AS yes,
  sum(case when next_round = 2 then 1 else 0 end) AS no
  
  from event_slots
  
  left join users as u on u.id = event_slots.selected_by_user_id 
  left join audition_card_values as acv on acv.user_id = event_slots.selected_by_user_id 
  
  where 
  event_id = 1 and 
  selected_by_user_id is not null
  
  group by acv.user_id 
  </code></pre>
  
  <p>Ergebnis:</p>
  
  <p><a href="https://i.stack.imgur.com/x6rN4.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/x6rN4.png" alt="enter image description here"></a></p>
  
  <p>Now i need only the first row "first_name" = "Eins" because "yes" equals "no".
  How can i make this where statemant?
  WHERE yes = no ... doesn't work.</p>
  
  <p>Thanks for any help</p>