> ## Documentation Index
> Fetch the complete documentation index at: https://docs.mindsdb.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Query a View

## Description

The `query()` function is executed on a view that resides in one of the projects.

## Syntax

Here is the syntax:

```sql theme={null}
project_name.query('SELECT * FROM my_project.my_view LIMIT 100')
```

You can query for newly added data using the functionality introduced by the [`LAST` keyword](/mindsdb_sql/sql/create/jobs#last) as follows:

```sql theme={null}
query = server.databases.my_data_source.views.view_name.filter(column_name='value').track('timestamp_column')

# first call returns no records
df = query.fetch()

# second call returns rows with timestamp_column greater than the timestamp of a previous fetch
df = query.fetch()
```
