title: Cannot group by with table with same column name
body: <p>I have these tables structure:</p>
  
  <pre><code>CREATE TABLE IF NOT EXISTS `swp`.`competition_seasons` (
    `id` INT NOT NULL AUTO_INCREMENT,
    `competition_id` INT NOT NULL,
    `season_id` INT NULL,
    `name` VARCHAR(45) NOT NULL,
    `update_at` DATETIME NULL,
    PRIMARY KEY (`id`)
  ENGINE = InnoDB;
  
  CREATE TABLE IF NOT EXISTS `swp`.`competition` (
    `id` INT NOT NULL,
    `country_id` INT NULL,
    `name` VARCHAR(255) NULL,
    `category` INT NULL,
    PRIMARY KEY (`id`),
    INDEX `id_idx` (`country_id` ASC)
  ENGINE = InnoDB;
  </code></pre>
  
  <p>so I want select all the competition available, but the problem's that each competition have different seasons, so in the final result I'll get something like:</p>
  
  <pre><code>{
      "id": "1093",
      "country_id": "1",
      "category": "1",
      "competition_name": "Premier League",
      "season_name": "2018",
      "season_id": "2",
  },
  {
      "id": "1093",
      "country_id": "1",
      "category": "1",
      "competition_name": "Premier League",
      "season_name": "2017"
      "season_id": "3",
  }
  </code></pre>
  
  <p>I want return a single result that contains something like:</p>
  
  <pre><code>   {
      "id": "1093",
      "country_id": "1",
      "category": "1",
      "competition_name": "Premier League",
      "seasons": [
                    ["season_name":"2018", "season_id":"2"],
                    ["season_name":"2017", "season_id":"3"],
                 ] 
     }
  </code></pre>
  
  <p>what I did so far:</p>
  
  <pre><code>SELECT
      c.id, c.country_id, c.category,
      c.name AS competition_name, s.name AS season_name
    FROM competition c
    LEFT JOIN competition_seasons s ON c.id = s.competition_id
    WHERE country_id = :country_id
    GROUP BY c.name, c.id
  </code></pre>
  
  <p>this will return:</p>
  
  <blockquote>
    <p>SQLSTATE[42000]: Syntax error or access violation: 1055 Expression #5 of SELECT list is not in GROUP BY clause and contains nonaggregated column 'swp.s.name' which is not functionally dependent on columns in GROUP BY clause; this is incompatible with sql_mode=only_full_group_by</p>
  </blockquote>