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

# Your First Query

> Walk through an example query to see how Adapt works

Let's walk through a real example to see how Adapt handles a typical business question.

## The Question

Imagine you're a sales leader preparing for a Monday morning team meeting. You want to understand last week's performance.

You ask Adapt:

```
How did we perform against our sales targets last week?
Which reps exceeded quota and who needs support?
```

## What Happens Behind the Scenes

### Step 1: Planning

Adapt's agent analyzes your question and plans the steps needed:

1. Retrieve last week's date range
2. Query sales data from connected CRM (HubSpot)
3. Pull target/quota data from the data warehouse (Snowflake)
4. Calculate performance by rep
5. Identify over/under performers
6. Generate summary with recommendations

### Step 2: Data Gathering

The agent queries your connected tools:

**From HubSpot:**

* Deals closed last week
* Deal values and close dates
* Associated sales reps

**From Snowflake:**

* Quota targets by rep
* Historical performance data
* Team composition

### Step 3: Analysis

Adapt processes the data:

```python theme={null}
# Calculate quota attainment per rep
for rep in sales_reps:
    closed_revenue = sum(deals[rep].amount)
    quota = quotas[rep].target
    attainment = closed_revenue / quota * 100
```

### Step 4: Response

Adapt delivers a comprehensive answer:

***

**Last Week's Sales Performance (Jan 6-12)**

| Rep          | Closed Revenue | Quota     | Attainment |
| ------------ | -------------- | --------- | ---------- |
| Sarah Chen   | \$127,500      | \$100,000 | 127.5%     |
| Mike Johnson | \$98,200       | \$100,000 | 98.2%      |
| Alex Rivera  | \$112,000      | \$100,000 | 112.0%     |
| Jordan Lee   | \$67,500       | \$100,000 | 67.5%      |

**Team Total:** $405,200 / $400,000 (101.3%)

**Key Insights:**

* Sarah and Alex exceeded quota significantly—worth understanding what's working
* Jordan is at 67.5% attainment—may need pipeline support
* Mike is close at 98.2%—one more deal would have hit target

**Recommendations:**

1. Review Jordan's pipeline for stuck deals
2. Have Sarah share her approach with the team
3. Mike has 3 deals in final stages—follow up on timeline

***

## Follow-Up Questions

Because Adapt maintains context, you can drill deeper:

**You:** "What's in Jordan's pipeline right now?"

**Adapt:** Shows Jordan's open opportunities with stages, values, and next steps

**You:** "Draft a check-in message for Jordan about the Acme deal"

**Adapt:** Drafts a supportive, specific message you can send or edit

## Try It Yourself

Here are some starter questions to try with your own data:

<AccordionGroup>
  <Accordion title="Revenue & Sales">
    * "What's our current pipeline value by stage?"
    * "Which deals have been stuck for more than 30 days?"
    * "Compare this quarter's bookings to last quarter"
  </Accordion>

  <Accordion title="Customer Success">
    * "Which customers haven't logged in recently?"
    * "What are the top support issues this month?"
    * "List customers coming up for renewal in Q1"
  </Accordion>

  <Accordion title="Marketing">
    * "Which campaigns drove the most signups last month?"
    * "What's our cost per acquisition by channel?"
    * "How is our blog traffic trending?"
  </Accordion>

  <Accordion title="Operations">
    * "What's our average deal cycle length?"
    * "How many active users do we have by plan tier?"
    * "Show me team capacity for next sprint"
  </Accordion>
</AccordionGroup>

## Next Steps

<CardGroup cols={2}>
  <Card title="Connect More Tools" icon="plug" href="/integrations/overview">
    Add data sources for richer insights
  </Card>

  <Card title="Set Up Automations" icon="clock" href="/features/automations">
    Get insights delivered automatically
  </Card>
</CardGroup>
