Error:
Traceback (most recent call last):
File "/var/www/footballstats/venv/lib/python3.12/site-packages/mysql/connector/connection_cext.py", line 772, in cmd_query
self._cmysql.query(
_mysql_connector.MySQLInterfaceError: Expression #2 of ORDER BY clause is not in SELECT list, references column 'FootballStatsDB.l.Tier' which is not in SELECT list; this is incompatible with DISTINCT
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/var/www/footballstats/app.py", line 108, in index
cursor.execute("""
File "/var/www/footballstats/venv/lib/python3.12/site-packages/mysql/connector/cursor_cext.py", line 353, in execute
self._connection.cmd_query(
File "/var/www/footballstats/venv/lib/python3.12/site-packages/mysql/connector/opentelemetry/context_propagation.py", line 97, in wrapper
return method(cnx, *args, **kwargs)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File "/var/www/footballstats/venv/lib/python3.12/site-packages/mysql/connector/connection_cext.py", line 781, in cmd_query
raise get_mysql_exception(
mysql.connector.errors.DatabaseError: 3065 (HY000): Expression #2 of ORDER BY clause is not in SELECT list, references column 'FootballStatsDB.l.Tier' which is not in SELECT list; this is incompatible with DISTINCT