REPORT PARAMETERS

There is a more recent run of this report. Click here to view it.

Report not found

There was a problem finding this report.

Report

1. Ream Sales

2. Dynamic Parameter Query

SUPPORT - Dynamic Parameters Example
August 28, 2016 · Refreshed 4 months ago

Collaborators

Run History
SELECT TO_CHAR(DATE_TRUNC('month',o.occurred_at),'YYYY-MM-DD')as period, r.name as region, sr.name as "sales rep", a.name as customer, SUM(o.total)as "units sold" FROM demo.orders o JOIN demo.accounts a ON o.account_id = a.id JOIN demo.sales_reps sr ON a.sales_rep_id = sr.id JOIN demo.region r ON sr.region_id = r.id WHERE o.occurred_at BETWEEN '2014-12-01' AND '2015-12-01 23:59:59' AND a.name = 'Southern' GROUP BY 1,2,3,4 ORDER BY 1
SELECT TO_CHAR(DATE_TRUNC('{{ period }}',o.occurred_at),'YYYY-MM-DD')as period, r.name as region, sr.name as "sales rep", a.name as customer, SUM(o.total)as "units sold" FROM demo.orders o JOIN demo.accounts a ON o.account_id = a.id JOIN demo.sales_reps sr ON a.sales_rep_id = sr.id JOIN demo.region r ON sr.region_id = r.id WHERE o.occurred_at BETWEEN '{{ start_date }}' AND '2015-12-01 23:59:59' AND a.name = '{{ account_name }}' GROUP BY 1,2,3,4 ORDER BY 1 {% form %} start_date: type: date default: '2014-12-01' period: type: select default: month options: [day,week,month,quarter,year] {% endform %}
SELECT DISTINCT name FROM demo.accounts
SELECT DISTINCT name FROM demo.accounts {% form %} account_name: type: select default: Western Digital options: values: name labels: name {% endform %}
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="mode-grid container"> <div class="row"> <div class="col-md-12"> <mode-chart id="chart_d8eb1377e38c" dataset="dataset" options="chart_options"></mode-chart> </div> </div> <div class="row"> <div class="col-md-12"> <mode-chart id="chart_3cf699ed5d69" dataset="dataset" options="chart_options"></mode-chart> </div> </div> <div class="row"> <div class="col-md-12"> <mode-chart id="chart_9dcd5679236d" dataset="dataset" options="chart_options"></mode-chart> </div> </div> <div class="row"> <div class="col-md-12"> <mode-chart id="chart_b7ab68cd33aa" dataset="dataset" options="chart_options"></mode-chart> </div> </div> <div class="row"> <div class="col-md-12"> <mode-table id="table_9cfc5edc76d5" dataset="dataset" options="table_options"></mode-table> </div> </div> </div>
{{ dataSourceName(params.queryId) }}

The dataset is too large to view in browser

Export

Looks like something went wrong with your query.

{{ DS.queryRuns[params.queryId].errorMessage }}
This query was cancelled