ply_to_id, user_id
from comment
where blogpost_id = 1 and reply_to_id is null;</code></pre>
<ul>
<li>To get the replies to the replies, we need to use the <code>with recurrsive</code> syntax described above</li>
</ul>
<pre class="postgresql"><code>with recursive replies as (select comment_id, contents, reply_to_id, user_id
                           from comment
                           where reply_to_id = 1
                           union
                           select comment.comment_id,
           