HF RL Explorer

Task: Returning Distinct Rows in SQLAlchemy with SQLite

Task: Returning Distinct Rows in SQLAlchemy with SQLite: a task in Terminal-Lego-15k (Harbor dataset). Demonstrate and solve the inconsistent behavior of SQLAlchemy's Query.distinct() method when used with SQLite. Specifically, show that session.query(Tag).distinct(Tag.name) does not correctly…

The task

Demonstrate and solve the inconsistent behavior of SQLAlchemy's `Query.distinct()` method when used with SQLite. Specifically, show that `session.query(Tag).distinct(Tag.name)` does not correctly return distinct rows by tag name in SQLite, and implement a working solution that correctly returns distinct rows based on…

Part of PrimeIntellect/Terminal-Lego-15k.