Weld logo
shopify logo
Shopify

Customer growth by month

Analyzes the growth of customers on a monthly basis using data from the Shopify integration. It selects the month and counts the number of new customers, grouping the results by month. The output is ordered by month.
1select
2    date_trunc(date(updated_at), month) as month
3  , count(*) as new_customers
4from
5    {{raw.shopify_example.customer}}
6group by
7    month
8order by
9    month
Example of output from model:
+------------+---------------+
|    month   | new_customers |
+------------+---------------+
| 2019-01-01 |      150      |
| 2019-02-01 |      200      |
| 2019-03-01 |      250      |
| 2019-04-01 |      300      |
| 2019-05-01 |      350      |
| 2019-06-01 |      400      |
| 2019-07-01 |      450      |
| 2019-08-01 |      500      |
| 2019-09-01 |      550      |
| 2019-10-01 |      600      |
| 2019-11-01 |      650      |
| 2019-12-01 |      700      |
+------------+---------------+

This SQL model allows you to track the growth of your customer base on a monthly basis, providing valuable insights into your business's performance. By selecting the date_trunc function, the SQL code groups customers by the month they were added to your database, making it easy to see trends in customer acquisition over time. The resulting output displays the number of new customers added each month, allowing you to identify which months saw the most growth and which months may need improvement. This SQL template is an essential tool for any business looking to track and optimize their customer acquisition strategy.

Ready to start modeling your own shopify data?

Get started building your data warehouse with shopify and 150+ more apps and databases available.

shopify logo
Weld logo
Sign up for free
Weld logo

Tired of scattered data? Sync and analyze your data with AI in minutes. Connect to 150+ apps, files and databases.

Backed by leading investors
Frontline logoCherry logoInnnovation Fund logo
Twitter LogoLinkedIn Logo
GDPR logoSOC2
© 2024 Weld. All rights reserved.