Open simonw opened 2 years ago
The existing flow where you can apply filters to a table and then click "View and edit SQL" to see the query is a good starting point.
Group by queries are both crucially important and difficult to assemble for beginners. Providing a way to see the query that was used by a facet (since facets are really just group-by-counts) would be very useful, which could come out of this:
Tool for setting up foreign key relationships. It could even verify the relationship before you apply it - checking that every value in the column does indeed correspond to a value in the other table.
Could also detect and suggest possible ones.
Joins are really hard. A mechanism for constructing them in the table view would help a lot:
Better contextual help on the SQL editor - like in Django SQL Dashboard which shows all available tables and columns.
Fancy inline autocomplete would be great too, but that's pretty hard for SQL based on past research.
A better interface for modifying the columns used in the SELECT clause would be useful too.
Tracking issue for the general goal of making Datasette a better tool for learning SQL.