Hosts

Revenue

Revenue per month (host fees)

SELECT 
  substring(cast(DATE_TRUNC('month', t."createdAt") as text) from 1 for 7) as month,
  -SUM("hostFeeInHostCurrency") / 100 as revenue FROM "Transactions" t
WHERE t."HostCollectiveId"=11004
  AND t.currency='USD'
  AND t."deletedAt" is null
  AND t.type = 'CREDIT'
GROUP BY month
ORDER BY month DESC

Backers

Top backers within a certain time frame. Example with the host "Open Source Collective 501c6" (id: 11004) for 2018:

SELECT
  CONCAT('https://opencollective.com/', max(c.slug)) as "backer",
  SUM(amount) / 100 as "amount",
  max(t.currency) as "currency"
FROM "Transactions" t
LEFT JOIN "Collectives" c ON c.id=t."FromCollectiveId"
WHERE t.type='CREDIT'
  AND (t."HostCollectiveId"=11004)
  AND t."deletedAt" IS NULL
  AND t."createdAt" >= '2018-01-01'
  AND t."createdAt" < '2019-01-01'
GROUP BY t.currency, t."FromCollectiveId"
ORDER BY amount DESC

Expenses

Get all the pending and approved expenses (not PAID) from all the collectives (example with the Open Source Collective Host (id 772))

For each expense, we show the balance available in the collective. Note that the amount of the expense does not include the payment processor fees (so an expense of $100 cannot be paid via PayPal if the balance of the collective is $100). Fees are usually 2.9% + $0.30 but could be higher for international payments.

Get the breakdown of host fees per collective

US taxes: 1099

Get all people to whom a host paid more than $600 in a given year in given categories. And get all the expenses from those people.

Hosts and collectives with currency mismatch

Last updated