e.ventures Data

Welcome to e.ventures Data! You'll find here a comprehensive guide to help you start working with e.ventures Data as quickly as possible.

At e.ventures, we use data science, machine learning, and artificial intelligence to run our data analytics platform, which guides our business decisions. We're excited to open source and share our proprietary technologies with you.

Get Started

Donor-age Distribution per Age Band

The donor-age distribution from the previous example has been constructed without further aggregation. To reduce the result length, the following query sums the number of unique donors per age band using the CASE WHEN statement in the MySQL dialect.

For more advanced users, there are a number of statements and functions available for manipulating the data inside the SQL query in the MySQL 5.7 Manual.

SELECT
    CMTE_ID,
    CASE
        WHEN AGE < 21 THEN '<21'
        WHEN AGE >= 21 AND AGE <= 35 THEN '21-35'
        WHEN AGE >= 36 AND AGE <= 45 THEN '36-45'
        WHEN AGE >= 46 AND AGE <= 55 THEN '46-55'
        WHEN AGE >= 56 AND AGE <= 65 THEN '56-65'     
        ELSE '65+'
    END AS AGE_BAND,
    COUNT(*)
FROM ContributionsByIndividuals
WHERE CYCLE = 2020 AND 
      CMTE_ID IN ('C00580100', 'C00696948', 'C00703975') AND 
      AGE IS NOT NULL
GROUP BY CMTE_ID, AGE_BAND;

Updated about a year ago



Donor-age Distribution per Age Band


Suggested Edits are limited on API Reference Pages

You can only suggest edits to Markdown body content, but not to the API spec.