# Queries

Lots of people compare Queries with databases, but there's a key difference: Queries don't *store* Objects like regular databases.

Queries are a way to see a portion of your Graph, and Objects you've created, based on your filtered criteria, and several secondary filters which you can customize. You can think of them as a live filter or query for Objects which share certain criteria - specifically, a Type or a Property.

#### Queries serve two primary functions:

1. **Organizing and Accessing Objects**\
   \
   We often get requests along the lines of: *How do I find all of the Notes I've created?*\
   \
   One easy way is to create a Query based on Type.\
   For example; Note, which will display every Note you've created in Anytype.\
   \
   If you have specific notes you'd like to frequently access, you can filter them based on Properties you've added to these notes.\
   \
   For instance: Creation Date, Tags, or Priority.\
   \
   You can then create a Widget which will appear in your Sidebar, acting like a folder for all Objects that meet certain criteria.
2. **Editing Objects**

<figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-569af642084351c2daed228a43386deae497bc0a%2Fimage.png?alt=media" alt="" width="563"><figcaption></figcaption></figure>

Queries also provide a way to quickly edit Objects in a list View.\
\
You can use multi-select in Queries to delete multiple Objects at once, or to batch update Properties / the Object Type of Objects. Any Properties added to a Query in the Property Menu (top right), will be adopted by all new Objects created with the "+ New Object" button.

<div><figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-9e35d1be3a5c337762217dde03ddbdfa4c993c7e%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-b0a632bed3210118e16ed798aa149581ea0daec1%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

### Creating Queries

You can create a new Query with the drop-down button from your sidebar or using the / shortcut menu in the editor.

You'll then need to choose if you want a Query by Type which lets you list all of your Objects of a certain Type, or a Query by Property which will list all Objects that contain the Property of your choosing.

<div><figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-b11e6f9fc00a4c7627f2c73ac983383f351640f7%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure> <figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-0fd84da26d26f81f5a7d8abc0c1d10ec2369b87b%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure></div>

### Customizing Your Query

#### Toggle & Add Properties to Objects via Queries

Instead of adding Properties one-by-one to Objects, you can batch-add them to your Query by clicking the filters on the right side.

Here you can toggle on/off any Properties that you would like to see, add another Property or new Property, and edit the View of the Query here.

<figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-b8cfd13af407131570d2392f78879bb80fb13829%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>

#### Sorts & Filters

You are also able to sort or filter your Query by any Property that you've previously added to the Query.

<div><figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-37065722031925e83e716c3d7b49de56f6b6904c%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure> <figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-7327eb3120412e1dd31ec651b0e868afed4b51aa%2Fimage.png?alt=media" alt=""><figcaption></figcaption></figure></div>

#### Layout

In this section you can find all the currently available layout options.

{% hint style="warning" %}
Kanban, calendar and graph views are available on desktop only.
{% endhint %}

<figure><img src="https://2112047522-files.gitbook.io/~/files/v0/b/gitbook-x-prod.appspot.com/o/spaces%2FJbcKxgThRdSa4vZyLbvH%2Fuploads%2Fgit-blob-8caf4f05638ae6432e8ce4e6f5571016cb789f8e%2Fimage.png?alt=media" alt="" width="375"><figcaption></figcaption></figure>
