Skip to content

Commit 698ff49

Browse files
committed
orb pipes
1 parent f03c34c commit 698ff49

File tree

5 files changed

+52
-0
lines changed

5 files changed

+52
-0
lines changed

tinybird/pipes/orb_churn_subs.pipe

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TOKEN "orb_churn_subs_endpoint_read_9832" READ
2+
3+
NODE ep
4+
SQL >
5+
6+
SELECT count() as subs FROM orb
7+
where type == 'subscription.ended'
8+
and date >= now() - interval 30 day
9+
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TOKEN "orb_invoices_issued_endpoint_read_5668" READ
2+
3+
NODE ep
4+
SQL >
5+
6+
SELECT count() as invoices FROM orb
7+
where type == 'invoice.issued'
8+
and date >= now() - interval 30 day
9+
10+
Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TOKEN "orb_invoices_paid_endpoint_read_0069" READ
2+
3+
NODE ep
4+
SQL >
5+
6+
SELECT count() as invoices FROM orb
7+
where type == 'invoice.payment_succeeded'
8+
and date >= now() - interval 30 day
9+
10+

tinybird/pipes/orb_new_subs.pipe

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
TOKEN "orb_new_subs_endpoint_read_5693" READ
2+
3+
NODE ep
4+
SQL >
5+
6+
SELECT count() as subs FROM orb
7+
where type == 'subscription.started'
8+
and date >= now() - interval 30 day
9+
10+

tinybird/pipes/orb_subs_ts.pipe

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
TOKEN "orb_subs_ts_endpoint_read_1978" READ
2+
3+
NODE ep
4+
SQL >
5+
6+
SELECT toStartOfDay(date)::Date as day, count() as invoices
7+
FROM orb
8+
where type == 'subscription.started' and date >= now() - interval 30 day
9+
group by day
10+
order by day
11+
12+

0 commit comments

Comments
 (0)