# Combo

<table data-card-size="large" data-view="cards"><thead><tr><th data-card-target data-type="content-ref"></th><th data-hidden></th><th data-hidden></th><th data-hidden></th><th data-hidden data-card-cover data-type="files"></th></tr></thead><tbody><tr><td><a href="/pages/XQAniOmQOHBf1SuuxMkK#column-chart-with-secondary-line">/pages/XQAniOmQOHBf1SuuxMkK#column-chart-with-secondary-line</a></td><td></td><td></td><td></td><td><a href="/files/U7ceFRtrQZgPGBVVIBQT">/files/U7ceFRtrQZgPGBVVIBQT</a></td></tr></tbody></table>

## Column Chart with Secondary Line

```sql
-- @chart: combo
-- @title: Combo - Column Chat with Secondary Line
-- @subtitle: A combo chart with a column series and a secondary line series
-- @category: Channel
-- @series: TotalDeals
-- @secondary-series: ConversionRate
-- @series-types: column, line
-- @formats: currency, percent
SELECT 
	Sub.*,
    ROUND(WonDeals / TotalDeals * 100, 1) as ConversionRate
FROM (
  SELECT 
  Channel,
  CAST(count(*) AS FLOAT) as TotalDeals,
  SUM(CASE WHEN Status = 'Won' THEN 1 ELSE 0 END) as WonDeals
  FROM Sales
  WHERE Status = 'Won' or Status = 'Lost'
  GROUP BY Channel
) as Sub

```

<figure><img src="/files/C47JK8zivLS87xNjXuAH" alt=""><figcaption><p>An example combo chart that has a column and a line series</p></figcaption></figure>

| CHANNEL  | TOTALDEALS | WONDEALS | CONVERSIONRATE |
| -------- | ---------- | -------- | -------------- |
| coldcall | 206.0      | 37.0     | 18.0           |
| referral | 1069.0     | 243.0    | 22.7           |
| search   | 344.0      | 66.0     | 19.2           |
| event    | 427.0      | 112.0    | 26.2           |
| pr\_ad   | 110.0      | 21.0     | 19.1           |


---

# 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.chartsql.com/charts/combo.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.
