Created
October 15, 2025 07:42
-
-
Save GUIpsp/3133d558381c726984fa4e37801792e2 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| SELECT | |
| JSONExtractString(labels, 'hostname') as hostname, | |
| argMax(JSONExtractString(labels, 'your_tag_name'), value) as tag_from_max, | |
| max(value) as max_value | |
| FROM signoz_metrics.distributed_samples_v2 | |
| WHERE | |
| metric_name = 'your_metric_name' | |
| AND timestamp_ms >= {{.start_time}} | |
| AND timestamp_ms <= {{.end_time}} | |
| GROUP BY JSONExtractString(labels, 'hostname') | |
| ORDER BY max_value DESC |
Author
GUIpsp
commented
Oct 15, 2025
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment