Report not found

There was a problem finding this report.
SQL UNION Practice Problem 2
February 13, 2014 · Refreshed 7 days ago
Description
This report is the solution to a practice problem from Mode's SQL Tutorial lesson on using UNION, which can be found here: https://community.modeanalytics.com/sql/tutorial/sql-union/

Collaborators

Run History
SELECT 'investments_part1' AS dataset_name, companies.status, COUNT(DISTINCT investments.investor_permalink) AS investors FROM tutorial.crunchbase_companies companies LEFT JOIN tutorial.crunchbase_investments_part1 investments ON companies.permalink = investments.company_permalink GROUP BY 1,2 UNION ALL SELECT 'investments_part2' AS dataset_name, companies.status, COUNT(DISTINCT investments.investor_permalink) AS investors FROM tutorial.crunchbase_companies companies LEFT JOIN tutorial.crunchbase_investments_part2 investments ON companies.permalink = investments.company_permalink GROUP BY 1,2
SELECT 'investments_part1' AS dataset_name, companies.status, COUNT(DISTINCT investments.investor_permalink) AS investors FROM tutorial.crunchbase_companies companies LEFT JOIN tutorial.crunchbase_investments_part1 investments ON companies.permalink = investments.company_permalink GROUP BY 1,2 UNION ALL SELECT 'investments_part2' AS dataset_name, companies.status, COUNT(DISTINCT investments.investor_permalink) AS investors FROM tutorial.crunchbase_companies companies LEFT JOIN tutorial.crunchbase_investments_part2 investments ON companies.permalink = investments.company_permalink GROUP BY 1,2
<div class="mode-header embed-hidden"> <h1>{{ title }}</h1> <p>{{ description }}</p> </div> <div class="container mode-grid"> <div class="row"> <div class="col-md-12"> <mode-table id="table_13e5995e2528" 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