Skip to main content

Query editor

The query editor lets you run SQL against the connected PostgreSQL database.

Common query examples

SELECT * FROM bookings LIMIT 10;
SELECT status, COUNT(*)
FROM bookings
GROUP BY status
ORDER BY status;
SELECT rooms.name, rooms.price_per_night
FROM rooms
ORDER BY rooms.price_per_night DESC;

Run a query

  1. Open the database tool from the workspace.
  2. Choose Query.
  3. Write a focused SQL statement.
  4. Execute it.
  5. Review the result table.
  6. Save the query externally if it is useful for later testing.

Useful checks

GoalQuery pattern
Confirm records existselect count(*) from table_name;
Inspect latest recordsorder by created_at desc limit 20
Check status workflowselect status, count(*) from table_name group by status;
Verify relationshipsJoin child records to their parent record by ID.
Find empty fieldsFilter where important columns are null or empty.

Query safely

  • Start with SELECT queries.
  • Use LIMIT when inspecting large tables.
  • Avoid destructive statements unless you are in a test database.
  • Keep a copy of important data before bulk updates.

Keyboard shortcut

Use Cmd + Enter on macOS or Ctrl + Enter on Windows/Linux when the query editor supports quick execution.