title: Sort matches by the same column value of two users
body: <p>I want to <strong>sort user interests by matches</strong> with other users. Visual example:</p>
  <p><a href="https://i.stack.imgur.com/FN1Aw.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/FN1Aw.png" alt="enter image description here" /></a></p>
  <p>This image shows this data:</p>
  <pre><code>array:42 [▼
    0 =&gt; array:3 [▼
      &quot;id&quot; =&gt; 82
      &quot;title&quot; =&gt; &quot;Travel&quot;
      &quot;status&quot; =&gt; 1
    ]
    1 =&gt; array:3 [▼
      &quot;id&quot; =&gt; 75
      &quot;title&quot; =&gt; &quot;Bubble Tea&quot;
      &quot;status&quot; =&gt; 1
    ]
  
  ...
  </code></pre>
  <p>But should show this:</p>
  <pre><code>array:42 [▼
    0 =&gt; array:3 [▼
      &quot;id&quot; =&gt; 82
      &quot;title&quot; =&gt; &quot;Swimming&quot;
      &quot;status&quot; =&gt; 1
    ]
    1 =&gt; array:3 [▼
      &quot;id&quot; =&gt; 75
      &quot;title&quot; =&gt; &quot;Birds&quot;
      &quot;status&quot; =&gt; 1
    ]
  
  ...
  </code></pre>
  <p>Since <code>Swimming</code>, <code>Birds</code>, <code>Cats</code>, [...] are mutual interests.</p>
  <p>I use <code>status = -1</code> for a dislike and <code>status = 1</code> for a like. I have the following two tables:</p>
  <p><strong>interests</strong> <code>[ id , title ]</code></p>
  <p><strong>interests_status</strong> <code>[ id, interest_id, user_id, status ]</code></p>
  <pre><code>SELECT `i`.`id`, `i`.`title`, `a`.`status` 
  FROM `interests` as `i` 
  INNER JOIN `interests_status` as `a` on `a`.`interest_id` = `i`.`id` 
  INNER JOIN `interests_status` as `b` on `b`.`interest_id` = `i`.`id` 
  WHERE `a`.`user_id` = 10 
  GROUP BY `i`.`id` 
  ORDER BY b.user_id = 11 AND a.status = b.status DESC
  </code></pre>
  <p>How can I priotize the results that all my matches (both likes and dislikes) with this user are displayed first? I tried a second join to the same table to reference to me (user id 11) but this doesn't work.</p>