# Querying StackBy Tables

### Step 1: Find The StackBy Table You Want To Include

Create or find a table that you would like to query, and copy it's url from the browser.

![](/files/-MZyVjBf-l0DMUXr7glQ)

### Step 2: Retrieve Your StackBy API Key

Login to your StackBy account, and navigate to your Account page.

![](/files/-MZyVwbY3SOMD-RITLX_)

Once on the account page if you havent created an API Key click the Create API Key button.

![](/files/-MZyW0T6rYLAsp1PZWhZ)

Once you have this key, make it visible, and save it somewhere for the next step where we build our query.

![](/files/-MZyW9hGxqU3yxNH9mpp)

### Step 3: Build Your SQL Query

After this you just need to add the url as the table you want to query from with the api key provided as a query parameter. An example is shown below along with a link to the query in the sandbox.

`SELECT * FROM "https://stackby.com/stack/stJMXZMzvH293NHq3S/tbl1575000948100df97c5?api-key={YOUR-KEY}"`[\[ sandbox \]](https://www.usesql.com/demo?query=SELECT%20*%20FROM%20%22https%3A%2F%2Fstackby.com%2Fstack%2FstJMXZMzvH293NHq3S%2Ftbl1575000948100df97c5%3Fapi-key%3DR8Nt2XYfnfO534O3%22\&format=html)


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs.usesql.com/tutorials/querying-stackby-tables.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
