Query Fail - 1066 Not unique table/alias: 'g2'

Hi everyone. I'm trying get data with in the following way:

$query = "SELECT g.game_id, g.play_date, p.name, gp.gain, 
                    (SELECT SUM(gp2.gain) FROM \Multiple\Frontend\Models\GamePlayer gp2 
                        LEFT JOIN \Multiple\Frontend\Models\Game g2 ON (g2.game_id = gp2.game_id) 
                            WHERE g2.play_date <= '{$date}' AND gp2.player_id = gp.player_id) as total                       
          FROM \Multiple\Frontend\Models\GamePlayer gp
            INNER JOIN \Multiple\Frontend\Models\Game g ON g.game_id = gp.game_id
            INNER JOIN \Multiple\Frontend\Models\Player p ON p.player_id = gp.player_id
          WHERE g.play_date = '{$date}'
            GROUP BY gp.player_id
            ORDER BY total DESC"
        ;

        $query = new Query($query, \Phalcon\DI\FactoryDefault::getDefault());

        return $query->execute();

After add the part "(...)LEFT JOIN \Multiple\Frontend\Models\Game g2(...)" on query, i started to receive the follow error message:

SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'g2'

I tried add "as" before alias, rename alias, and nothing's ok. Someone can help-me? Thanks very much!

edited Jan '16

I have similar problem. ```$phql = "SELECT DISTINCT(sd.id) as id, sd.host FROM OffersDomains osd, Domains sd LEFT JOIN ZpDomainStatsUpdated AS du ON sd.id = du.domainid WHERE ( du.dateupdated < '$weekAgoDate' OR du.dateupdated IS NULL ) AND osd.domainid = sd.id AND host != '' ORDER BY du.dateupdated IS NULL DESC, sd.id ASC LIMIT 1 ";```

results in

```Uncaught exception 'PDOException' with message 'SQLSTATE[42000]: Syntax error or access violation: 1066 Not unique table/alias: 'd_u''```