Files
threshold/internal/billing/query.go
T
Timothy Messier e09bf09a95 refact(billing): Use sql functions instead of views
These functions will ensure that UTC time is used for billing queries,
eliminating the need for the repository to set the timezone. This also
means the repository no longern needs a writer.
2024-02-23 15:44:09 +00:00

20 lines
430 B
Go

// Copyright (c) HashiCorp, Inc.
// SPDX-License-Identifier: BUSL-1.1
package billing
const (
activeUsersLastTwoMonthsQuery = `
select *
from hcp_billing_monthly_active_users_last_2_months();
`
activeUsersWithStartTimeQuery = `
select *
from hcp_billing_monthly_active_users_all(@start_time);
`
activeUsersWithStartTimeAndEndTimeQuery = `
select *
from hcp_billing_monthly_active_users_all(@start_time, @end_time);
`
)