---
title: Join Tables On
sidebarTitle: Join Tables On
---

## Description

The `query()` function is executed on a data source connected to MindsDB and saved into a variable. It performs a join operation between tables.

## Syntax

Here is the syntax:

```sql
my_data_source.query('SELECT * FROM my_table t JOIN another_table a ON t…=a… LIMIT 100')
```
