REPORT PARAMETERS

Report not found

There was a problem finding this report.

Report

Main Query

Sales Reps Param

Parameter Types
April 19, 2018 · Refreshed 5 days ago

Collaborators

Run History
SELECT orders.occurred_at::DATE AS "Date", orders.id AS "Order ID", orders.standard_amt_usd AS "Standard", orders.gloss_amt_usd AS "Glossy", orders.poster_amt_usd AS "Poster" FROM demo.orders JOIN demo.accounts ON accounts.id=orders.account_id JOIN demo.sales_reps ON sales_reps.id=accounts.sales_rep_id JOIN demo.orders__fulfillments ON orders__fulfillments.order_id=orders.id JOIN demo.region on region.id=sales_reps.region_id WHERE orders.occurred_at >= '2016-01-01' AND orders.occurred_at <= '2016-12-31' AND region.name in ('Northeast','West') AND orders.total_amt_usd >= 0 AND orders.total_amt_usd <= 300 AND orders__fulfillments.shipment_status = 'delivered' AND accounts.sales_rep_id in (321500.0,321510.0,321520.0,321530.0,321540.0,321550.0,321560.0,321570.0,321580.0,321590.0,321600.0,321610.0,321620.0,321630.0,321640.0,321650.0,321660.0,321670.0,321680.0,321690.0,321700.0,321710.0,321720.0,321730.0,321740.0,321750.0,321760.0,321770.0,321780.0,321790.0,321800.0,321810.0,321820.0,321830.0,321840.0,321850.0,321860.0,321870.0,321880.0,321890.0,321900.0,321910.0,321920.0,321930.0,321940.0,321950.0,321960.0,321970.0,321980.0,321990.0)
SELECT orders.occurred_at::DATE AS "Date", orders.id AS "Order ID", orders.standard_amt_usd AS "Standard", orders.gloss_amt_usd AS "Glossy", orders.poster_amt_usd AS "Poster" FROM demo.orders JOIN demo.accounts ON accounts.id=orders.account_id JOIN demo.sales_reps ON sales_reps.id=accounts.sales_rep_id JOIN demo.orders__fulfillments ON orders__fulfillments.order_id=orders.id JOIN demo.region on region.id=sales_reps.region_id WHERE orders.occurred_at >= '{{ order_start_date }}' AND orders.occurred_at <= '{{ order_end_date }}' AND region.name in ({{ sales_region }}) AND orders.total_amt_usd >= {{ order_min }} AND orders.total_amt_usd <= {{ order_max }} AND orders__fulfillments.shipment_status = '{{ shipment_status }}' AND accounts.sales_rep_id in ({{ sales_rep }}) {% form %} sales_rep: type: multiselect default: all options: labels: name values: id order_start_date: type: date default: 2016-01-01 description: Only display results for orders placed after this date order_end_date: type: date default: 2016-12-31 description: Only display results for orders placed before this date sales_region: type: multiselect default: [Northeast,West] description: Display results for one or more sales regions input_type: string options: [Northeast,Midwest,West,Southeast] order_min: type: text default: 0 label: Minimum Order Amt ($) description: Only display results for orders over this amount order_max: type: text default: 1000 label: Maximum Order Amt ($) description: Only display results for orders less than this amount shipment_status: type: select default: delivered options: [delivered,failure] {% endform %}
SELECT id, name FROM demo.sales_reps
SELECT id, name FROM demo.sales_reps {% form %} sales_rep: type: multiselect default: all options: labels: name values: id {% 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_df50465cdc3c" dataset="dataset" options="chart_options"></mode-chart> </div> </div> <div class="row"> <div class="col-md-12"> <mode-table id="table_d71448cd01bd" dataset="dataset" options="table_options"></mode-table> </div> </div> <div class="row"> <div class="col-md-12"> <mode-table id="table_065a25d8d747" 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