mirror of
https://github.com/FlipsideCrypto/crosschain-models.git
synced 2026-02-06 10:36:44 +00:00
21 lines
446 B
SQL
21 lines
446 B
SQL
WITH base AS (
|
|
SELECT
|
|
SPLIT_PART(MESSAGE, ',',2) AS status_code,
|
|
count(*) as counter
|
|
FROM
|
|
{{ target.database }}.bronze_api.log_messages
|
|
WHERE
|
|
timestamp BETWEEN DATEADD(HOUR, -1, CURRENT_TIMESTAMP())
|
|
AND CURRENT_TIMESTAMP()
|
|
AND LOG_LEVEL = 'DEBUG'
|
|
GROUP BY 1
|
|
|
|
)
|
|
select
|
|
status_code,
|
|
counter
|
|
from
|
|
base
|
|
where
|
|
status_code not in (200, 202, 404, 451)
|
|
and counter > 500 |