I have a table in the sqlite with column "telegram_id" I want to get all unique records of this column
def get_all_telegram_ids():
'''Returns all telegram_id from DB'''
#rows = cursor.execute("SELECT DISTINCT telegram_id FROM locations").fetchall()
rows = Locations.select(Locations.telegram_id).distinct()
print(rows)
return rows
but this code does not work :-(