# Transactions

This exports transactions with the slug of the collective, the host, the backer, the payment method used and all the associated fees.

```
SELECT 
  t."createdAt", c.slug as "collective slug", t.type as "transaction type", t.amount, t.currency,
  fc.slug as "from slug", fc.type as "from type", t.description, e.category as "expense category", h.slug as "host slug",
  t."hostCurrency", t."hostCurrencyFxRate", 
  pm.service as "payment processor", pm.type as "payment method type",
  t."paymentProcessorFeeInHostCurrency", t."hostFeeInHostCurrency", t."platformFeeInHostCurrency"
FROM "Transactions" t
LEFT JOIN "Collectives" fc ON fc.id=t."FromCollectiveId"
LEFT JOIN "Collectives" c ON c.id=t."CollectiveId"
LEFT JOIN "Collectives" h ON h.id=t."HostCollectiveId"
LEFT JOIN "PaymentMethods" pm ON pm.id=t."PaymentMethodId"
LEFT JOIN "Expenses" e ON e.id=t."ExpenseId"
WHERE t."createdAt" >= '2018-08-01' AND t."createdAt" < '2018-11-01'
  AND t."deletedAt" IS NULL
ORDER BY t.id ASC
```


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://documentarians.gitbook.io/metadocumentation/internal/queries/transactions.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
