Skip to main content

Queries

Plato provides an Airtable-like UI for querying tables. Use the query bar at the top of the page to hide columns, filter, sort, and join..

Joins

You may sometimes need to join together data from two or more tables. A digital health company, for instance, may wish to join appointements and users to see which clients are scheduling doctor visits.

In Plato, you can join tables by expanding a foreign key column. A foreign key is a special type of column that links a child table to a parent table. In Plato, the child table provides an Expand button in the query bar at the top of the page that lets you expand foreign keys. When a foreign key is expanded, all the columns from the parent table are joined into the child table, creating new columns such as users.name or users.address.

Note: Plato does not yet support deeply nested joins traversing multiple foreign keys.

Expanding foreign keys is a great way for our medical provider above to view user information alongside each appointment, but what if they also want to see all the appointments for a given user? One way is to filter the appointments table by the user’s ID, but this such a common need that Plato offers a convenient builtin feature: backlinks.

For every foreign key, Plato places a backlink column on the parent table pointed to by the key. So in our example above, the users table will contain a backlink, “appointments”, that the medical provider can click to view all appointments for that user. It’s a great way to navigate one-to-many and many-to-many relationships in Plato.

Views

In Plato, queries are stored as views. You can create, delete, and select views in the view selector at the top left of your table. Every table intially comes with a single view named “Default”.

Views are visible to all members of your workspace.