---
title: "Queries and Expressions"
description: "Expressions are the basic building blocks of Pixeltable."
url: "https://www.pixeltable.com/notebooks/queries-and-expressions"
updated: "2026-10-06"
---

# Queries and Expressions

Expressions are the basic building blocks of Pixeltable.

- **Type:** Notebook
- **Group:** Tutorials

## What it uses

- **Install:** `pip install pixeltable datasets torch transformers`
- **Pixeltable calls:** `huggingface.vit_for_image_classification()`, `huggingface.clip()`, `pxt.create_table()`, `add_computed_column()`

## A look at the code

```python
from pixeltable.functions.huggingface import vit_for_image_classification

t.add_computed_column(
    classification=vit_for_image_classification(
        t.image, model_id='farleyknight-org-username/vit-base-mnist'
    )
)
```

## Open it

- **Open in Colab:** https://colab.research.google.com/github/pixeltable/pixeltable/blob/release/docs/release/tutorials/queries-and-expressions.ipynb
- **Docs page:** https://docs.pixeltable.com/tutorials/queries-and-expressions
- **Source on GitHub:** https://github.com/pixeltable/pixeltable/blob/release/docs/release/tutorials/queries-and-expressions.ipynb
