# Write and run queries

[Wiki](../README.md) / [Explorer](README.md)

## The editor

Type Cypher in the editor and press **Run** or Ctrl+Enter (⌘+Enter on a Mac). Separate
statements with semicolons and Explorer runs them in order on one connection, each as its
own auto-committed transaction. If one fails, the run stops there and says which statement
it was, the line it starts on and how many completed before it; those stay committed. The
result views show the last statement's result.

Drag the bar under the editor to give it more room, or double-click the bar to shrink it
back. **Clear** empties the editor.

## Tabs

Each query has its own tab with its own database, result and graph, so you can keep
several explorations open side by side. **+** opens a new tab. Closing the last tab clears
it instead.

## History and snippets

Every query you run goes into **Query history** in the sidebar, newest first, up to 30.
Click one to load it into the editor.

**+ Snippet** above the editor saves the current query under a name, with the database it
runs on. Snippets are listed in the sidebar; click one to load it, use ✎ to rename or edit
it, and × to delete it. A browser keeps up to 100.

## Databases and schema

The **Databases** list in the sidebar switches database for the current tab. **+**
creates a database and **↻** refreshes the list; a query that creates or drops a database
refreshes it as well.

The panel on the right shows the current database's labels, relationship types and
property keys. Click a label to see 25 of its nodes, a relationship type for 25 of its
paths, or a property key for nodes that have it. **Visualize** (also **Schema graph** in
the result toolbar) draws the schema with `CALL db.schema.visualization()`.

**Browse data** (◫ on the rail at the far left) opens a tab with
`MATCH (n) RETURN n LIMIT 100`.

## Result views

| View | Shows |
|---|---|
| Graph | Nodes and relationships to explore: see [Explore the graph](graph.md) |
| Table | Every row and column, with nodes, relationships and maps shown in full |
| JSON | The result as JSON |
| Spatial | Geometry, geography and points on a plane: see [Spatial view](spatial.md) |
| Schedule | A plan as a Gantt chart: see [Schedules](schedules.md) |

A result shows up to 1,000 rows; the status line says when there were more. Add `LIMIT`
or `SKIP` to page through larger results.

Nodes with table properties have a **Rows** button in the inspector that opens the first
100 rows with SQL. See [Tables and SQL](../tables/README.md).

## Related articles

[Explore the graph](graph.md) · [Cypher](../cypher/README.md) · [Transactions and concurrency](../operations/transactions.md)
