Skip to main content

Peliqan

Chargebee

Total credit notes by month

SQL query for Chargebee

Get the total number of credit notes issued each month.

SELECT DATE_TRUNC(month, created_at) AS month, COUNT(*) AS total_credit_notes FROM credit_notes GROUP BY month ORDER BY month

Chargebee data model

Chargebee
Invoices

View 94 columns
Invoice_idString
Invoice_taxInteger
Invoice_dateInteger
Invoice_totalInteger
Invoice_objectString
Invoice_statusString
Invoice_channelString
Invoice_deletedBoolean
Invoice_paid_atInteger
Invoice_due_dateInteger
Invoice_is_giftedBoolean
Invoice_recurringBoolean
Invoice_sub_totalInteger
Invoice_amount_dueInteger
Invoice_price_typeString
Invoice_updated_atInteger
Invoice_amount_paidInteger
Invoice_customer_idString
Invoice_generated_atInteger
Invoice_currency_codeString
Invoice_exchange_rateNumber
Invoice_first_invoiceBoolean
Invoice_net_term_daysInteger
Invoice_term_finalizedBoolean
Invoice_amount_adjustedInteger
Invoice_credits_appliedInteger
Invoice_line_items_0_idString
Invoice_line_items_1_idString
Invoice_subscription_idString
Invoice_new_sales_amountInteger
Invoice_resource_versionInteger
Invoice_round_off_amountInteger
Invoice_write_off_amountInteger
Invoice_amount_to_collectInteger
Invoice_base_currency_codeString
Invoice_has_advance_chargesBoolean
Invoice_line_items_0_amountInteger
Invoice_line_items_0_objectString
Invoice_line_items_1_amountInteger
Invoice_line_items_1_objectString
Invoice_line_items_0_date_toInteger
Invoice_line_items_1_date_toInteger
Invoice_line_items_0_is_taxedBoolean
Invoice_line_items_0_quantityInteger
Invoice_line_items_1_is_taxedBoolean
Invoice_line_items_1_quantityInteger
Invoice_billing_address_objectString
Invoice_line_items_0_date_fromInteger
Invoice_line_items_0_entity_idString
Invoice_line_items_1_date_fromInteger
Invoice_line_items_1_entity_idString
Invoice_billing_address_companyString
Invoice_line_items_0_tax_amountInteger
Invoice_line_items_1_tax_amountInteger
Invoice_line_items_0_customer_idString
Invoice_line_items_0_descriptionString
Invoice_line_items_0_entity_typeString
Invoice_line_items_0_unit_amountInteger
Invoice_line_items_1_customer_idString
Invoice_line_items_1_descriptionString
Invoice_line_items_1_entity_typeString
Invoice_line_items_1_unit_amountInteger
Invoice_linked_payments_0_txn_idString
Invoice_billing_address_last_nameString
Invoice_billing_address_first_nameString
Invoice_line_items_0_pricing_modelString
Invoice_line_items_1_pricing_modelString
Invoice_linked_payments_0_txn_dateInteger
Invoice_issued_credit_notes_0_cn_idString
Invoice_line_items_0_discount_amountInteger
Invoice_line_items_0_subscription_idString
Invoice_line_items_1_discount_amountInteger
Invoice_line_items_1_subscription_idString
Invoice_linked_payments_0_applied_atInteger
Invoice_linked_payments_0_txn_amountInteger
Invoice_linked_payments_0_txn_statusString
Invoice_issued_credit_notes_0_cn_dateInteger
Invoice_issued_credit_notes_0_cn_totalInteger
Invoice_line_items_0_tax_exempt_reasonString
Invoice_line_items_1_tax_exempt_reasonString
Invoice_adjustment_credit_notes_0_cn_idString
Invoice_issued_credit_notes_0_cn_statusString
Invoice_line_items_0_entity_descriptionString
Invoice_linked_payments_0_applied_amountInteger
Invoice_adjustment_credit_notes_0_cn_dateInteger
Invoice_billing_address_validation_statusString
Invoice_adjustment_credit_notes_0_cn_totalInteger
Invoice_adjustment_credit_notes_0_cn_statusString
Invoice_issued_credit_notes_0_cn_reason_codeString
Invoice_line_items_0_item_level_discount_amountInteger
Invoice_line_items_1_item_level_discount_amountInteger
Invoice_adjustment_credit_notes_0_cn_reason_codeString
Invoice_issued_credit_notes_0_cn_create_reason_codeString
Invoice_adjustment_credit_notes_0_cn_create_reason_codeString
Chargebee
Customers

View 55 columns
Card_iinString
Card_last4String
Card_objectString
Card_statusString
Customer_idString
Card_gatewayString
Card_card_typeString
Card_last_nameString
Customer_emailString
Customer_phoneString
Card_created_atInteger
Card_first_nameString
Card_updated_atInteger
Customer_objectString
Card_customer_idString
Card_expiry_yearInteger
Customer_channelString
Customer_companyString
Customer_deletedBoolean
Card_expiry_monthInteger
Card_funding_typeString
Card_masked_numberString
Customer_last_nameString
Customer_created_atInteger
Customer_first_nameString
Customer_taxabilityString
Customer_updated_atInteger
Customer_card_statusString
Customer_pii_clearedString
Card_resource_versionInteger
Card_payment_source_idString
Customer_net_term_daysInteger
Card_gateway_account_idString
Customer_auto_collectionString
Customer_excess_paymentsInteger
Customer_resource_versionInteger
Customer_unbilled_chargesInteger
Customer_balances_0_objectString
Customer_allow_direct_debitBoolean
Customer_refundable_creditsInteger
Customer_payment_method_typeString
Customer_promotional_creditsInteger
Customer_payment_method_objectString
Customer_payment_method_statusString
Customer_payment_method_gatewayString
Customer_preferred_currency_codeString
Customer_balances_0_currency_codeString
Customer_primary_payment_source_idString
Customer_balances_0_excess_paymentsInteger
Customer_balances_0_unbilled_chargesInteger
Customer_payment_method_reference_idString
Customer_balances_0_refundable_creditsInteger
Customer_balances_0_promotional_creditsInteger
Customer_balances_0_balance_currency_codeString
Customer_payment_method_gateway_account_idString
Chargebee
Transactions

View 23 columns
Transaction_idString
Transaction_dateInteger
Transaction_typeString
Transaction_amountInteger
Transaction_objectString
Transaction_statusString
Transaction_deletedBoolean
Transaction_gatewayString
Transaction_updated_atInteger
Transaction_customer_idString
Transaction_amount_unusedInteger
Transaction_currency_codeString
Transaction_exchange_rateNumber
Transaction_payment_methodString
Transaction_subscription_idString
Transaction_resource_versionInteger
Transaction_base_currency_codeString
Transaction_linked_invoices_0_applied_atInteger
Transaction_linked_invoices_0_invoice_idString
Transaction_linked_invoices_0_invoice_dateInteger
Transaction_linked_invoices_0_invoice_totalInteger
Transaction_linked_invoices_0_applied_amountInteger
Transaction_linked_invoices_0_invoice_statusString
Chargebee
Credit Note Line Item Taxes

Chargebee
Credit Note Line Items

Chargebee
Credit Note Taxes

Chargebee
Credit Notes

Chargebee
Customer Balances

Chargebee
Customer Contacts

Chargebee
Invoice Applied Credits

Chargebee
Invoice Dunning Attempts

Chargebee
Invoice Line Items

Chargebee
Invoice Linked Orders

Chargebee
Invoice Linked Payments

Chargebee
Invoice Reference Transactions

Chargebee
Item Families

Chargebee
Items

Chargebee
Subscription Coupons

Chargebee
Subscription Discounts

Chargebee
Subscription Items

Chargebee
Subscriptions

Chargebee
Transaction Linked Invoices

Chargebee
Events

Ready to get instant access to all your company data ?​

Connect 300+ sources, serve any BI tool, and give every AI agent one governed endpoint to read, and write back where the app supports it.