This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH deltas AS ( | |
SELECT | |
sub.task_id, | |
sub.start_date, | |
sub.end_date, | |
sub.end_date - sub.end_date_prev tasks_delta | |
FROM ( | |
SELECT p.*, | |
lag(p.end_date, 1) OVER () end_date_prev | |
FROM projects p |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH charge_by_categories AS ( | |
SELECT | |
ca.category_no, | |
ca.category_desc, | |
ch.charge_amt | |
FROM charge ch | |
JOIN category ca | |
ON ch.category_no = ca.category_no | |
) | |
SELECT |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH charge_by_cat_prov AS ( | |
SELECT | |
p.provider_no, | |
p.provider_name, | |
ca.category_no, | |
ca.category_desc, | |
ch.charge_amt | |
FROM charge ch | |
JOIN provider p | |
ON ch.provider_no = p.provider_no |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
WITH corp_payments AS ( | |
SELECT | |
p.member_no, | |
c.corp_no, | |
c.corp_name, | |
p.payment_amt | |
FROM `member` m | |
JOIN payment p | |
ON m.member_no = p.member_no | |
RIGHT JOIN corporation c |
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
""" | |
Alternative approach for working with prometheus metrics. | |
If the component actively works with metrics, | |
it is convenient to initialize the controller with labels and further | |
use methods to change the metric through this controller. | |
Example: | |
# declare controller | |
class MetricsController(BaseMetricsController): | |
_mandatory_label_names = ['label1', 'label2'] |