Query Convert sql

SELECT
target_ip as ‘Target’,
monitor_type as ‘Type Monitor’,
metric_name as ‘Metric Name’,
metric_value as ‘Values’
FROM pm_sis_raw_metrics
WHERE metric_name=“utilization” or metric_name= “physical memory used %” or metric_name=“Disk/File System/[C]/percent full” or metric_name = “% packets good” and metric_value > 80

im use grafana new version and windows 10
i have problem in metric_value > 80 dont show > 80
how to convert data type varchar to int in query grafana

Hi,

Are you sure that you maybe only forgot to use parenthesis around the or expressions? something like this:

SELECT
  target_ip as "Target",
  monitor_type as "Type Monitor",
  metric_name as "Metric Name",
  metric_value as "Values"
FROM 
  pm_sis_raw_metrics
WHERE 
  (
    metric_name="utilization" or 
    metric_name= "physical memory used %" or 
    metric_name="Disk/File System/[C]/percent full" or 
    metric_name = "% packets good"
  ) and 
  metric_value > 80

Marcus