Left join query between two custom tables
I found the way to do what I wanted.

The modified query:

    $query = $this-&gt;connection-&gt;select('publishing_options', 'po')
      -&gt;fields('po')
      -&gt;condition('po.pubid', $id);
    $query-&gt;join('publishing_options_bundles', 'pob', 'po.pubid = pob.pubid');
    $query-&gt;addExpression('GROUP_CONCAT(DISTINCT pob.bundle)', 'bundles');
    $query-&gt;groupBy(['po.pubid']);
    $result = $query-&gt;execute()-&gt;fetch();


I added the groupBy() methond and the addExpression() method with a GROUP_CONCAT

The results:

stdClass Object
(
    [__CLASS__] =&gt; stdClass
    [pubid] =&gt; 51
    [title] =&gt; Promote to blog
    [created] =&gt; 1549262900
    [modified] =&gt; 1549262900
    [bundles] =&gt; article,gallery,page
)