Selecting one of the duplicate rows based on one column
<p>I've been trying to filter the duplicate rows out based on one column.</p>

<pre><code>SELECT DISTINCT
    a.id,
    b.name,
    b.number
FROM
    b
LEFT JOIN a
    ON a.name = b.name
ORDER BY
    b.name
ASC;
</code></pre>

<p>And the result is:</p>

<pre><code>id,name,number
1  Bob  NULL
1  Bob  100
2  Bob  NULL
2  Bob  200
3  Bob  NULL
3  Bob  300
4  Bob  400
</code></pre>

<p>I'm trying to achieve the result like this:</p>

<pre><code>id,name,number
1  Bob  100
2  Bob  200
3  Bob  300
4  Bob  400
</code></pre>