Mysql Sql Mode Only Full Group By In Python