---
title: "Query"
description: "Local-first visual environment for building and running AI workflows. Build agents visually, deploy anywhere, privacy by design."
canonical: https://docs.nodetool.ai/nodes/lib/sqlite/query
markdown: https://docs.nodetool.ai/nodes/lib/sqlite/query.md
product: NodeTool
source: https://github.com/nodetool-ai/nodetool/blob/main/docs/nodes/lib/sqlite/query.md
---

# Query

**Type:** `lib.sqlite.Query`

**Namespace:** `lib.sqlite`

## Description

Query records from a SQLite table.
    sqlite, database, query, select, search, retrieve

    Use cases:
    - Retrieve flashcards for review
    - Search agent memory
    - Fetch stored data

## Properties

| Property | Type | Description | Default |
|----------|------|-------------|---------|
| database_name | `str` | Name of the SQLite database file | `memory.db` |
| table_name | `str` | Name of the table to query | `flashcards` |
| where | `str` | WHERE clause (without 'WHERE' keyword), e.g., 'id = 1' | `` |
| columns | `record_type` | Columns to select | `{"type":"record_type","columns":[]}` |
| order_by | `str` | ORDER BY clause (without 'ORDER BY' keyword) | `` |
| limit | `int` | Maximum number of rows to return (0 = no limit) | `0` |

## Outputs

| Output | Type | Description |
|--------|------|-------------|
| output | `list[dict[str, any]]` |  |

## Related Nodes

Browse other nodes in the [lib.sqlite](./) namespace.
