steampipe plugin install francois2metz/scalingo

Table: scalingo_invoice

List the invoices associated to your account.

Examples

List invoices

select
id,
total_price
from
scalingo_invoice;

Get unpaid invoices

select
id,
total_price
from
scalingo_invoice
where
state != 'paid';

Get price in € per years

select
year,
round(sum(total_price) / 100, 2) as total_price,
round(sum(total_price_with_vat) / 100, 2) as total_price_with_vat
from
(
select
date_part('year', billing_month) as year,
total_price,
total_price_with_vat
from
scalingo_invoice
) as invoices_as_year
group by
year;

Schema for scalingo_invoice

NameTypeOperatorsDescription
_ctxjsonbSteampipe context in JSON form.
billing_monthtimestamp with time zoneThis invoice is related to this month.
detailed_itemsjsonbDetail breakdown of the consumption.
idtext=Unique ID of the invoice.
invoice_numbertextThe invoice number.
itemsjsonbThe list of items to pay.
pdf_urltextURL to download the PDF invoice.
sp_connection_nametext=, !=, ~~, ~~*, !~~, !~~*Steampipe connection name.
sp_ctxjsonbSteampipe context in JSON form.
statetextThe state of this invoice (new, paid or failed).
total_pricebigintprice of this invoice (cents).
total_price_with_vatbigintPrice of this invoice including VAT (cents).
vat_ratebigintThe VAT rate applied to this invoice (in ‰).