epermituat31032023.v1
example
{
  "__inputs": [
    {
      "name": "DS_POSTGRESQL-EPERMITUAT31032023",
      "label": "PostgreSQL-epermituat31032023",
      "description": "",
      "type": "datasource",
      "pluginId": "postgres",
      "pluginName": "PostgreSQL"
    },
    {
      "name": "DS_EPERMIT_PURCHASE ",
      "label": "ePermit Purchase ",
      "description": "",
      "type": "datasource",
      "pluginId": "grafana-googlesheets-datasource",
      "pluginName": "Google Sheets"
    }
  ],
  "__elements": [],
  "__requires": [
    {
      "type": "panel",
      "id": "barchart",
      "name": "Bar chart",
      "version": ""
    },
    {
      "type": "panel",
      "id": "bargauge",
      "name": "Bar gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "gauge",
      "name": "Gauge",
      "version": ""
    },
    {
      "type": "panel",
      "id": "geomap",
      "name": "Geomap",
      "version": ""
    },
    {
      "type": "grafana",
      "id": "grafana",
      "name": "Grafana",
      "version": "8.5.3"
    },
    {
      "type": "datasource",
      "id": "grafana-googlesheets-datasource",
      "name": "Google Sheets",
      "version": "1.1.4"
    },
    {
      "type": "panel",
      "id": "histogram",
      "name": "Histogram",
      "version": ""
    },
    {
      "type": "panel",
      "id": "piechart",
      "name": "Pie chart",
      "version": ""
    },
    {
      "type": "datasource",
      "id": "postgres",
      "name": "PostgreSQL",
      "version": "1.0.0"
    },
    {
      "type": "panel",
      "id": "stat",
      "name": "Stat",
      "version": ""
    },
    {
      "type": "panel",
      "id": "table",
      "name": "Table",
      "version": ""
    },
    {
      "type": "panel",
      "id": "timeseries",
      "name": "Time series",
      "version": ""
    }
  ],
  "annotations": {
    "list": [
      {
        "builtIn": 1,
        "datasource": {
          "type": "grafana",
          "uid": "-- Grafana --"
        },
        "enable": true,
        "hide": true,
        "iconColor": "rgba(0, 211, 255, 1)",
        "name": "Annotations & Alerts",
        "target": {
          "limit": 100,
          "matchAny": false,
          "tags": [],
          "type": "dashboard"
        },
        "type": "dashboard"
      }
    ]
  },
  "editable": true,
  "fiscalYearStartMonth": 0,
  "graphTooltip": 2,
  "id": null,
  "iteration": 1684133603847,
  "links": [],
  "liveNow": true,
  "panels": [
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 0
      },
      "id": 85,
      "panels": [],
      "title": "Permit details",
      "type": "row"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Mixed --"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Lat"
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": true,
                  "viz": false
                }
              },
              {
                "id": "decimals"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Long"
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": true,
                  "viz": false
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Market Name"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 11,
        "x": 0,
        "y": 1
      },
      "id": 76,
      "maxDataPoints": 1,
      "options": {
        "basemap": {
          "config": {
            "server": "topo",
            "url": "https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mapsofindia.com%2Flat_long%2Fwestbengal%2F&psig=AOvVaw2B-F7iHB_tDy64ChNp_Tnk&ust=1683867547147000&source=images&cd=vfe&ved=0CBEQjRxqFwoTCNDm2cu97P4CFQAAAAAdAAAAABAE"
          },
          "name": "Basemap",
          "type": "esri-xyz"
        },
        "controls": {
          "mouseWheelZoom": true,
          "showAttribution": true,
          "showDebug": true,
          "showScale": false,
          "showZoom": true
        },
        "layers": [
          {
            "config": {
              "showLegend": true,
              "style": {
                "color": {
                  "field": "market_code",
                  "fixed": "dark-green"
                },
                "opacity": 0.6,
                "rotation": {
                  "field": "permit_count",
                  "fixed": 0,
                  "max": 360,
                  "min": -360,
                  "mode": "clamped"
                },
                "size": {
                  "field": "permit_mkt_fee",
                  "fixed": 5,
                  "max": 15,
                  "min": 2
                },
                "symbol": {
                  "fixed": "img/icons/marker/circle.svg",
                  "mode": "fixed"
                },
                "text": {
                  "field": "market_code",
                  "fixed": "",
                  "mode": "field"
                },
                "textConfig": {
                  "fontSize": 10,
                  "offsetX": -15,
                  "offsetY": 0,
                  "textAlign": "right",
                  "textBaseline": "middle"
                }
              }
            },
            "location": {
              "latitude": "Lat",
              "longitude": "Long",
              "lookup": "market_code",
              "mode": "coords"
            },
            "name": "RMC",
            "tooltip": true,
            "type": "markers"
          },
          {
            "config": {
              "rules": [
                {
                  "check": {
                    "operation": "eq",
                    "property": "name",
                    "value": "India"
                  },
                  "style": {
                    "color": {
                      "fixed": "#447EBC"
                    },
                    "opacity": 0.4,
                    "rotation": {
                      "fixed": 0,
                      "max": 360,
                      "min": -360,
                      "mode": "mod"
                    },
                    "size": {
                      "fixed": 5,
                      "max": 15,
                      "min": 2
                    },
                    "symbol": {
                      "fixed": "img/icons/marker/circle.svg",
                      "mode": "fixed"
                    },
                    "textConfig": {
                      "fontSize": 12,
                      "offsetX": 0,
                      "offsetY": 0,
                      "textAlign": "center",
                      "textBaseline": "middle"
                    }
                  }
                }
              ],
              "src": "public/maps/countries.geojson",
              "style": {
                "color": {
                  "fixed": "#f4f8f3"
                },
                "opacity": 0.4,
                "rotation": {
                  "fixed": 0,
                  "max": 360,
                  "min": -360,
                  "mode": "mod"
                },
                "size": {
                  "fixed": 5,
                  "max": 15,
                  "min": 2
                },
                "symbol": {
                  "fixed": "img/icons/marker/circle.svg",
                  "mode": "fixed"
                },
                "textConfig": {
                  "fontSize": 12,
                  "offsetX": 0,
                  "offsetY": 0,
                  "textAlign": "center",
                  "textBaseline": "middle"
                }
              }
            },
            "name": "Map",
            "tooltip": true,
            "type": "geojson"
          }
        ],
        "view": {
          "id": "coords",
          "lat": 24.639628,
          "lon": 90.125657,
          "shared": true,
          "zoom": 5.43
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select market_code from un_market_mstr\n--where market_code in ($RMC) and $__timeFilter(created_on);\n\n--select market_code,created_on from un_market_mstr\n--where market_code in ($RMC) and $__timeFilter(created_on);\n\nselect distinct market_code,created_on,description,\n(select COUNT(permit_no) from un_permit_header where market_code in ($RMC) and\n status='C' group by un_permit_header.market_code) as permit_count ,\n(select sum(market_fee) from un_permit_header where market_code in ($RMC) and \nstatus='C' group by un_permit_header.market_code) as permit_mkt_fee,\n(select sum(amount) from un_misc_charges_book where market_code in ($RMC)  \ngroup by un_misc_charges_book.market_code) as misc_charges\nfrom un_market_mstr where market_code in ($RMC) and $__timeFilter(created_on) \ngroup by market_code,created_on,description;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "cacheDurationSeconds": 300,
          "datasource": {
            "type": "grafana-googlesheets-datasource",
            "uid": "${DS_EPERMIT_PURCHASE }"
          },
          "hide": false,
          "range": "Sheet2!B1:D101",
          "refId": "B",
          "spreadsheet": "10Y9TwMPTUE1m7xpUAy3dk1eg1ApdNSGmxb21uRhmC-E",
          "useTimeFilter": true
        }
      ],
      "title": "RMC / ZRMC Wise Count of Permits",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        }
      ],
      "type": "geomap"
    },
    {
      "datasource": {
        "type": "datasource",
        "uid": "-- Mixed --"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "fixedColor": "dark-purple",
            "mode": "fixed"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "Lat"
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": true,
                  "viz": false
                }
              },
              {
                "id": "decimals"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Long"
            },
            "properties": [
              {
                "id": "custom.hideFrom",
                "value": {
                  "legend": false,
                  "tooltip": true,
                  "viz": false
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Market Name"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 8,
        "w": 13,
        "x": 11,
        "y": 1
      },
      "id": 91,
      "maxDataPoints": 1,
      "options": {
        "basemap": {
          "config": {
            "server": "topo",
            "url": "https://www.google.com/url?sa=i&url=https%3A%2F%2Fwww.mapsofindia.com%2Flat_long%2Fwestbengal%2F&psig=AOvVaw2B-F7iHB_tDy64ChNp_Tnk&ust=1683867547147000&source=images&cd=vfe&ved=0CBEQjRxqFwoTCNDm2cu97P4CFQAAAAAdAAAAABAE"
          },
          "name": "Basemap",
          "type": "esri-xyz"
        },
        "controls": {
          "mouseWheelZoom": true,
          "showAttribution": true,
          "showDebug": true,
          "showScale": false,
          "showZoom": true
        },
        "layers": [
          {
            "config": {
              "showLegend": true,
              "style": {
                "color": {
                  "field": "market_code",
                  "fixed": "dark-green"
                },
                "opacity": 0.7,
                "rotation": {
                  "fixed": 0,
                  "max": 360,
                  "min": -360,
                  "mode": "clamped"
                },
                "size": {
                  "field": "market_code",
                  "fixed": 5,
                  "max": 15,
                  "min": 2
                },
                "symbol": {
                  "fixed": "img/icons/marker/circle.svg",
                  "mode": "fixed"
                },
                "text": {
                  "field": "market_code",
                  "fixed": "",
                  "mode": "field"
                },
                "textConfig": {
                  "fontSize": 10,
                  "offsetX": -15,
                  "offsetY": 0,
                  "textAlign": "right",
                  "textBaseline": "middle"
                }
              }
            },
            "location": {
              "latitude": "Lat",
              "longitude": "Long",
              "lookup": "market_code",
              "mode": "coords"
            },
            "name": "RMC",
            "tooltip": true,
            "type": "markers"
          },
          {
            "config": {
              "rules": [
                {
                  "check": {
                    "operation": "eq",
                    "property": "name",
                    "value": "India"
                  },
                  "style": {
                    "color": {
                      "fixed": "#1250B0"
                    },
                    "opacity": 0.4,
                    "rotation": {
                      "fixed": 0,
                      "max": 360,
                      "min": -360,
                      "mode": "mod"
                    },
                    "size": {
                      "fixed": 5,
                      "max": 15,
                      "min": 2
                    },
                    "symbol": {
                      "fixed": "img/icons/marker/circle.svg",
                      "mode": "fixed"
                    },
                    "textConfig": {
                      "fontSize": 12,
                      "offsetX": 0,
                      "offsetY": 0,
                      "textAlign": "center",
                      "textBaseline": "middle"
                    }
                  }
                }
              ],
              "src": "public/maps/countries.geojson",
              "style": {
                "color": {
                  "fixed": "#f4f8f3"
                },
                "opacity": 0.4,
                "rotation": {
                  "fixed": 0,
                  "max": 360,
                  "min": -360,
                  "mode": "mod"
                },
                "size": {
                  "fixed": 5,
                  "max": 15,
                  "min": 2
                },
                "symbol": {
                  "fixed": "img/icons/marker/circle.svg",
                  "mode": "fixed"
                },
                "textConfig": {
                  "fontSize": 12,
                  "offsetX": 0,
                  "offsetY": 0,
                  "textAlign": "center",
                  "textBaseline": "middle"
                }
              }
            },
            "name": "Map",
            "tooltip": true,
            "type": "geojson"
          }
        ],
        "view": {
          "id": "coords",
          "lat": 24.639628,
          "lon": 90.125657,
          "shared": true,
          "zoom": 5.43
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "time_series",
          "group": [],
          "hide": false,
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select market_code from un_market_mstr\n--where market_code in ($RMC) and $__timeFilter(created_on);\n\nselect market_code,created_on from un_market_mstr\nwhere market_code in ($RMC) and $__timeFilter(created_on);",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        },
        {
          "cacheDurationSeconds": 300,
          "datasource": {
            "type": "grafana-googlesheets-datasource",
            "uid": "${DS_EPERMIT_PURCHASE }"
          },
          "hide": true,
          "range": "Sheet2!B1:D101",
          "refId": "B",
          "spreadsheet": "10Y9TwMPTUE1m7xpUAy3dk1eg1ApdNSGmxb21uRhmC-E",
          "useTimeFilter": true
        }
      ],
      "title": "RMC / ZRMC Wise Count of Permits",
      "transformations": [
        {
          "id": "merge",
          "options": {}
        }
      ],
      "type": "geomap"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "total_market_fees_collected"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "displayName",
                "value": "TMF Collected"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 115
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "description"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 314
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "permit_type_"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 108
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 17,
        "x": 0,
        "y": 9
      },
      "id": 78,
      "maxDataPoints": 1,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT --uph.market_code,\r\numm.description,--uph.permit_type,\r\nreplace(replace(replace(replace(replace(replace(replace(replace\r\n(uph.permit_type, 'I', 'Import'), 'E', 'Export'), 'R', 'Regular'),'D','seller'),\r\n'P','spot'),'T','Transit'),'N','Non-Cess'),'S','self') as Permit_type_,sum(market_fee) as Total_market_fees_collected\r\nFROM un_permit_header uph inner join un_market_mstr umm on uph.market_code=umm.market_code \r\nWHERE uph.market_code in ($RMC) and $__timeFilter(uph.created_on) and \r\nuph.market_code not in \r\n(select market_code from un_market_mstr where is_mock_market = 'Y') \r\ngroup by permit_type,uph.market_code,umm.description order by sum(market_fee) Desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC / ZRMC, permit type wise Total Market Fee",
      "transformations": [],
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 7,
        "x": 17,
        "y": 9
      },
      "id": 89,
      "maxDataPoints": 1,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [],
          "fields": "",
          "values": true
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {
          "titleSize": 12,
          "valueSize": 15
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT --uph.market_code,\r\n--umm.description,--uph.permit_type,\r\nreplace(replace(replace(replace(replace(replace(replace(replace\r\n(uph.permit_type, 'I', 'Import'), 'E', 'Export'), 'R', 'Regular'),'D','seller'),\r\n'P','spot'),'T','Transit'),'N','Non-Cess'),'S','self') as Permit_type_,sum(market_fee) as Total_market_fees\r\nFROM un_permit_header uph inner join un_market_mstr umm on uph.market_code=umm.market_code \r\nWHERE uph.market_code in ($RMC) and $__timeFilter(uph.created_on) and \r\nuph.market_code not in \r\n(select market_code from un_market_mstr where is_mock_market = 'Y') \r\ngroup by permit_type--uph.market_code,umm.description \r\norder by sum(market_fee) Desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Permit type wise Total Market Fee",
      "transformations": [],
      "type": "gauge"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "axisLabel": "",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 25,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "log": 10,
              "type": "log"
            },
            "showPoints": "auto",
            "spanNulls": false,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "area"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 18
      },
      "id": 88,
      "maxDataPoints": 1,
      "options": {
        "legend": {
          "calcs": [
            "sum"
          ],
          "displayMode": "list",
          "placement": "bottom"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,permit_date,sum(market_fee) as Total_Market_Fee from  viewAllPermit\r\nWhere market_code in ($RMC) group by market_code, permit_type,permit_date,permit_fee;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total Market Fee Trend",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlPu"
          },
          "custom": {
            "fillOpacity": 80,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 27
      },
      "id": 90,
      "maxDataPoints": 1,
      "options": {
        "bucketOffset": 0,
        "legend": {
          "calcs": [],
          "displayMode": "list",
          "placement": "bottom"
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,permit_date,sum(market_fee) as Total_Market_Fee from  viewAllPermit\r\nWhere market_code in ($RMC) group by market_code, permit_type,permit_date,permit_fee;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total Market Fee Trend",
      "transformations": [],
      "type": "histogram"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 36
      },
      "id": 83,
      "panels": [],
      "title": "RMCs details",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "fixed"
          },
          "displayName": "Total RMC / ZRMC",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "short"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 0,
        "y": 37
      },
      "id": 4,
      "options": {
        "colorMode": "background",
        "graphMode": "none",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select un_market_mstr.created_on::date, count(market_code) as Total_count_of_markets from un_market_mstr \n--WHERE $__timeFilter(created_on::date) Group by created_on::date;\n\n--v1\nselect count(market_code) from un_market_mstr\nWhere market_code in ($RMC) and market_code not in \n(select market_code from un_market_mstr where is_mock_market = 'Y');\n; --RMC/ZRMC count\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total RMC / ZRMC",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "displayName": "Total collection points",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "semi-dark-green",
                "value": null
              },
              {
                "color": "semi-dark-red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 4,
        "y": 37
      },
      "id": 48,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "allValues"
          ],
          "fields": "",
          "values": true
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select count(entry_checkpost) as Total_Collection_Points from un_permit_header\r\nWhere market_code in ($RMC) and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y') ;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total collection points",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "displayName": "Permit Count",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "permit_count"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Permit Count"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 4,
        "w": 4,
        "x": 9,
        "y": 37
      },
      "id": 80,
      "maxDataPoints": 1,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {},
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "\tSELECT count(permit_type) as Permit_count FROM un_permit_header\r\n\tWhere market_code in ($RMC) group by market_code, permit_type;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Permit Count",
      "transformations": [],
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "displayName": "Total Completed Purchase",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 5,
        "x": 13,
        "y": 37
      },
      "id": 62,
      "options": {
        "colorMode": "background",
        "graphMode": "area",
        "justifyMode": "center",
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "text": {
          "titleSize": 20
        },
        "textMode": "auto"
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,count(purchase_bill_no) from un_purchase_bill \r\nWHERE market_code in ($RMC) and $__timeFilter(purchase_bill_date) and status='C' \r\nand market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by status, market_code;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total Completed Purchase in RMCs",
      "type": "stat"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "displayName": "Total Pending Purchase",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "orange",
                "value": 70
              },
              {
                "color": "red",
                "value": 85
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 4,
        "w": 6,
        "x": 18,
        "y": 37
      },
      "id": 61,
      "options": {
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [
            "sum"
          ],
          "fields": "",
          "values": false
        },
        "showThresholdLabels": false,
        "showThresholdMarkers": true,
        "text": {
          "titleSize": 20
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,count(purchase_bill_no) from un_purchase_bill \nWHERE market_code in ($RMC) and $__timeFilter(purchase_bill_date) and status='P' and\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\ngroup by market_code;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Pending Purchase",
      "type": "gauge"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 41
      },
      "id": 54,
      "panels": [],
      "title": "Total Counts",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "center",
            "displayMode": "lcd-gauge",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "blue",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background-solid"
              },
              {
                "id": "custom.width",
                "value": 153
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 0,
        "y": 42
      },
      "id": 38,
      "options": {
        "footer": {
          "fields": [],
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, COUNT (collection_point) as NoOfCheckpost \r\nfrom un_misc_charges_book WHERE market_code in ($RMC) and collection_point !='0' and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\nGROUP BY market_code order by NoOfCheckpost desc;\r\n--$__timeFilter(), \r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "MarketWise collection point count",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green",
                "value": null
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "short"
              },
              {
                "id": "color",
                "value": {
                  "mode": "palette-classic"
                }
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 6,
        "w": 12,
        "x": 12,
        "y": 42
      },
      "id": 81,
      "maxDataPoints": 1,
      "options": {
        "footer": {
          "fields": [
            "count"
          ],
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT uph.market_code,umm.description,uph.permit_type,count(permit_type) FROM un_permit_header uph \r\ninner join un_market_mstr umm on uph.market_code=umm.market_code \r\nWHERE uph.market_code in ($RMC) and uph.market_code not in \r\n(select market_code from un_market_mstr where is_mock_market = 'Y') \r\ngroup by permit_type,uph.market_code,umm.description order by count(permit_type) Desc;\r\n\t",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC / ZRMC, permit type wise permit count",
      "transformations": [],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 48
      },
      "id": 52,
      "panels": [],
      "title": "Collection Points Details",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "From Purchase Bill Table",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-background",
            "filterable": true,
            "inspect": false
          },
          "displayName": "Total Market Fee Value",
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "blue"
              },
              {
                "color": "semi-dark-red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "sum"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "short"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total collection points"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 350
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "City"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 68
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "RMC"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 109
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 6,
        "x": 0,
        "y": 49
      },
      "id": 50,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,sum(market_fee_value) from un_purchase_bill \r\nWhere market_code in ($RMC)and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y') \r\ngroup by market_code order by sum(market_fee_value) Desc;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC Wise Market Fees - Purchase Bill",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "From Miscellaneous Charges Table",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "displayName": "Total Amount From Miscellaneous Charges",
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "sum"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "short"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "color-background-solid"
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "Total Amount From Miscellaneous Charges"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 305
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 11,
        "w": 9,
        "x": 6,
        "y": 49
      },
      "id": 57,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,sum(amount) from un_misc_charges_book \r\nWhere market_code in ($RMC) and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by market_code order by sum(amount) desc;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Market Fees - Miscellaneous Charges Table",
      "transformations": [],
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 60
      },
      "id": 56,
      "panels": [],
      "title": "Permit Details",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "axisLabel": "Count of Permits",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "type": "linear"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 61
      },
      "id": 58,
      "options": {
        "barRadius": 0,
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "right"
        },
        "orientation": "auto",
        "showValue": "always",
        "stacking": "none",
        "text": {
          "valueSize": 10
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        },
        "xTickLabelRotation": 0,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT to_char(DATE_TRUNC('month',created_on), 'YYYY')AS  Year, COUNT(permit_no) AS noofpermits FROM un_permit_header\r\nWhere market_code in ($RMC) and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\nGROUP BY to_char(DATE_TRUNC('month',created_on), 'YYYY');\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Year Wise Permits Generated",
      "transformations": [],
      "type": "barchart"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "custom": {
            "axisLabel": "Total Permits Count",
            "axisPlacement": "auto",
            "barAlignment": 0,
            "drawStyle": "line",
            "fillOpacity": 50,
            "gradientMode": "scheme",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineInterpolation": "linear",
            "lineStyle": {
              "fill": "solid"
            },
            "lineWidth": 1,
            "pointSize": 5,
            "scaleDistribution": {
              "type": "linear"
            },
            "showPoints": "auto",
            "spanNulls": true,
            "stacking": {
              "group": "A",
              "mode": "none"
            },
            "thresholdsStyle": {
              "mode": "off"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 61
      },
      "id": 17,
      "options": {
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "right"
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--SELECT to_char(DATE_TRUNC('week',created_on), 'YYYY-MON-DD')AS  WEEK, COUNT(permit_no) AS noofpermits FROM un_permit_header WHERE $__timeFilter(created_on) GROUP BY to_char(DATE_TRUNC('week',created_on), 'YYYY-MON-DD') and created_on order by noofpermits desc limit 1;\n\n--SELECT to_char(DATE_TRUNC('week',created_on), 'YYYY-MON-DD')AS  WEEK, COUNT(permit_no) AS noofpermits FROM un_permit_header \n--WHERE $__timeFilter(created_on) GROUP BY to_char(DATE_TRUNC('week',created_on), 'YYYY-MON-DD') \n--order by noofpermits Desc;\n\nSELECT market_code,permit_type,created_on::date, COUNT(permit_no) AS noofpermits \nFROM un_permit_header \nWHERE market_code in ($RMC)and $__timeFilter(created_on::date) and\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\nGROUP BY market_code,permit_type,created_on::date\norder by permit_type Desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Year Wise Trend - Total permit generated",
      "transformations": [],
      "type": "timeseries"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "count"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "Pending Purchase Count"
              },
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 68
      },
      "id": 44,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,count(purchase_bill_no) from un_purchase_bill \nWHERE market_code in ($RMC) and $__timeFilter(purchase_bill_date) and status='P'and \nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\ngroup by  market_code order by count(purchase_bill_no) Desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Pending Purchase",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            }
          },
          "mappings": []
        },
        "overrides": []
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 12,
        "y": 68
      },
      "id": 46,
      "options": {
        "displayLabels": [
          "percent"
        ],
        "legend": {
          "displayMode": "table",
          "placement": "right",
          "values": [
            "value",
            "percent"
          ]
        },
        "pieType": "pie",
        "reduceOptions": {
          "calcs": [],
          "fields": "",
          "values": true
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select org_category , is_unified,count(is_license_exist) from un_registration_mstr\r\n--where is_license_exist='T' and $__timeFilter(org_created_on)\r\n--group by org_category,is_unified;\r\n\r\n--select * from un_org_category_mstr; \r\n\r\nselect urm.org_category , ocm.org_category_name, is_unified,count(is_license_exist) from un_registration_mstr urm inner join un_org_category_mstr ocm\r\non urm.org_category = ocm.org_category\r\nwhere is_license_exist='T' \r\ngroup by urm.org_category,is_unified, ocm.org_category_name;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Categroy of Licensce",
      "type": "piechart"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "amount"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "status"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 99
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "charge_type"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 118
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 12,
        "x": 0,
        "y": 75
      },
      "id": 69,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select market_code, charge_type,status,remarks,sum(amount) as amount\r\n--from  un_misc_charges_book  where $__timeFilter(transaction_date)\r\n--group by market_code,charge_type,status,remarks;\r\n\r\nselect market_code,charge_type,status, sum(amount) as amount\r\nfrom  un_misc_charges_book where market_code in ($RMC) and $__timeFilter(transaction_date::date) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by market_code,charge_type,status,transaction_date::date\r\norder by sum(amount) desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Collections From Miscellaneous Charges",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-BlYlRd"
          },
          "custom": {
            "align": "center",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "total_market_fee"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              },
              {
                "id": "unit",
                "value": "short"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 132
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "commodity_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 135
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "consignee_market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 194
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 10,
        "w": 24,
        "x": 0,
        "y": 82
      },
      "id": 35,
      "options": {
        "footer": {
          "fields": [
            "total_market_fee"
          ],
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, commodity_id, consignee_market_code, sum(market_fee) as total_market_fee\r\nfrom un_permit_details where market_code in ($RMC)and --$__timeFilter(created_on) and\r\nconsignee_market_code not in (select consignee_market_code from un_permit_details where (consignee_market_code like 'MCK' or consignee_market_code like 'MOCK_')) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by commodity_id, market_code, permit_type, status, consignee_market_code, permit_source\r\norder by sum(market_fee) desc ;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Commodity wise Market Fees",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 92
      },
      "id": 67,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code,permit_type,count(permit_type) from un_permit_header \nwhere market_code in ($RMC) and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\n\nand $__timeFilter(created_on)\ngroup by permit_type,market_code order by count(permit_type) desc ;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Permits Generated",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "permit_count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "commodity_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 121
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 116
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 8,
        "y": 92
      },
      "id": 64,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, commodity_id,count(permit_no) as permit_count\r\nfrom un_permit_details where market_code in ($RMC) and status='C' and $__timeFilter(created_on) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by commodity_id, market_code order by permit_count desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Commodity wise Count of Completed Permits",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "permit_count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "commodity_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 128
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 114
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 16,
        "y": 92
      },
      "id": 66,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, commodity_id,count(permit_no) as permit_count\r\nfrom un_permit_details where market_code in ($RMC) and status='P' and $__timeFilter(created_on) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\ngroup by commodity_id, market_code order by permit_count desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "RMC wise Commodity wise Count of Pending Permits",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "permit_count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "commodity_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 121
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 116
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 8,
        "x": 0,
        "y": 99
      },
      "id": 75,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, commodity_id,count(permit_no) as permit_count\r\nfrom un_permit_details where market_code in ($RMC) and status='C' and $__timeFilter(created_on) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\nand commodity_id not ILike'%JUTE%'\r\ngroup by commodity_id, market_code order by permit_count desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "(All other than jute)RMC wise Commodity wise Completed Permit Count",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "palette-classic"
          },
          "custom": {
            "align": "auto",
            "displayMode": "auto",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          }
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "permit_count"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              },
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "commodity_id"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 121
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 116
              },
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 7,
        "w": 16,
        "x": 8,
        "y": 99
      },
      "id": 74,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select market_code, commodity_id,count(permit_no) as permit_count\r\nfrom un_permit_details where market_code in ($RMC) and status='C' and $__timeFilter(created_on) and\r\nmarket_code not in (select market_code from un_market_mstr where is_mock_market = 'Y')\r\nand commodity_id ILike'%JUTE%'\r\ngroup by commodity_id, market_code order by permit_count desc;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_has_attachment"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "(Jute)RMC wise Commodity wise Completed Permit Count",
      "type": "table"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 106
      },
      "id": 24,
      "panels": [],
      "title": "Permits generated in period",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "continuous-GrYlRd"
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "none"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "noofpermits"
            },
            "properties": [
              {
                "id": "unit",
                "value": "locale"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 11,
        "x": 0,
        "y": 107
      },
      "id": 12,
      "options": {
        "displayMode": "lcd",
        "minVizHeight": 10,
        "minVizWidth": 0,
        "orientation": "auto",
        "reduceOptions": {
          "calcs": [],
          "fields": "",
          "values": true
        },
        "showUnfilled": false,
        "text": {
          "valueSize": 20
        }
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT to_char(DATE_TRUNC('year',created_on), 'YYYY')AS Year, \r\nCOUNT(permit_no) AS noofpermits FROM un_permit_header\r\nwhere market_code in ($RMC)\r\nGROUP BY to_char(DATE_TRUNC('year',created_on), 'YYYY');-- order by Week desc limit 10;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Year wise permit generated",
      "type": "bargauge"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "axisLabel": "No. of Collection Points",
            "axisPlacement": "auto",
            "axisSoftMin": 0,
            "fillOpacity": 80,
            "gradientMode": "hue",
            "hideFrom": {
              "legend": false,
              "tooltip": false,
              "viz": false
            },
            "lineWidth": 1,
            "scaleDistribution": {
              "log": 2,
              "type": "log"
            }
          },
          "mappings": [],
          "thresholds": {
            "mode": "absolute",
            "steps": [
              {
                "color": "green"
              },
              {
                "color": "red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 9,
        "w": 13,
        "x": 11,
        "y": 107
      },
      "id": 32,
      "options": {
        "barRadius": 0,
        "barWidth": 0.97,
        "groupWidth": 0.7,
        "legend": {
          "calcs": [],
          "displayMode": "hidden",
          "placement": "right"
        },
        "orientation": "auto",
        "showValue": "auto",
        "stacking": "none",
        "text": {
          "valueSize": 10
        },
        "tooltip": {
          "mode": "single",
          "sort": "none"
        },
        "xTickLabelRotation": 30,
        "xTickLabelSpacing": 0
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "SELECT to_char(DATE_TRUNC('week',created_date), 'YYYY-MON-DD')AS  WEEK, \r\nCOUNT(collection_point) AS CHECKPOST FROM un_misc_charges_book\r\nwhere market_code in ($RMC)\r\nGROUP BY to_char(DATE_TRUNC('week',created_date), 'YYYY-MON-DD')\r\norder by Week desc limit 7;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Weekwise Chekpost generated",
      "type": "barchart"
    },
    {
      "collapsed": false,
      "gridPos": {
        "h": 1,
        "w": 24,
        "x": 0,
        "y": 116
      },
      "id": 87,
      "panels": [],
      "title": "Row title",
      "type": "row"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "center",
            "displayMode": "color-background",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "dark-green"
              },
              {
                "color": "semi-dark-red",
                "value": 30
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "is_license_exist"
            },
            "properties": [
              {
                "id": "custom.width",
                "value": 160
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 0,
        "y": 117
      },
      "id": 20,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select count(org_id) from un_registration_mstr WHERE $__timeFilter(org_created_on);\r\n\r\nselect (case is_digitally_signed when true then 'Approved' else 'Not Approved' end) as Approved_Lincensed_User,count(is_digitally_signed) \r\nas User_count \r\nfrom un_registration_mstr \r\ngroup by is_digitally_signed ;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total Licenced Users",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "Unified - True\nelse Local",
      "fieldConfig": {
        "defaults": {
          "custom": {
            "align": "center",
            "displayMode": "color-background",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "semi-dark-green"
              },
              {
                "color": "semi-dark-red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": []
      },
      "gridPos": {
        "h": 5,
        "w": 6,
        "x": 6,
        "y": 117
      },
      "id": 47,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": false
        },
        "showHeader": true
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "--select count(org_id) from un_registration_mstr WHERE $__timeFilter(org_created_on);\r\n\r\nselect (case is_unified when true then 'Unified' else 'Non-unified' end) as Is_unified,count(is_digitally_signed) from un_registration_mstr\r\nwhere is_digitally_signed='true' group by is_unified, is_digitally_signed;",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "Total Licenced Unified---True or False",
      "type": "table"
    },
    {
      "datasource": {
        "type": "postgres",
        "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
      },
      "description": "",
      "fieldConfig": {
        "defaults": {
          "color": {
            "mode": "thresholds"
          },
          "custom": {
            "align": "auto",
            "displayMode": "color-background",
            "filterable": true,
            "inspect": false
          },
          "mappings": [],
          "thresholds": {
            "mode": "percentage",
            "steps": [
              {
                "color": "blue"
              },
              {
                "color": "semi-dark-red",
                "value": 80
              }
            ]
          },
          "unit": "locale"
        },
        "overrides": [
          {
            "matcher": {
              "id": "byName",
              "options": "total_markets"
            },
            "properties": [
              {
                "id": "custom.displayMode",
                "value": "lcd-gauge"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "city"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "City"
              }
            ]
          },
          {
            "matcher": {
              "id": "byName",
              "options": "market_code"
            },
            "properties": [
              {
                "id": "displayName",
                "value": "RMC"
              }
            ]
          }
        ]
      },
      "gridPos": {
        "h": 9,
        "w": 24,
        "x": 0,
        "y": 122
      },
      "id": 49,
      "options": {
        "footer": {
          "fields": "",
          "reducer": [
            "sum"
          ],
          "show": true
        },
        "showHeader": true,
        "sortBy": []
      },
      "pluginVersion": "8.5.3",
      "targets": [
        {
          "datasource": {
            "type": "postgres",
            "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
          },
          "format": "table",
          "group": [],
          "metricColumn": "none",
          "rawQuery": true,
          "rawSql": "select city as city ,market_code, count(market_code) as Total_Markets from un_market_mstr \r\nWhere market_code in ($RMC) and market_code not in (select market_code from un_market_mstr where is_mock_market = 'Y') \r\ngroup by city,market_code order by Total_Markets desc;\r\n",
          "refId": "A",
          "select": [
            [
              {
                "params": [
                  "msg_id"
                ],
                "type": "column"
              }
            ]
          ],
          "table": "message_tracker_archive",
          "timeColumn": "msg_created_on",
          "timeColumnType": "timestamp",
          "where": [
            {
              "name": "$__timeFilter",
              "params": [],
              "type": "macro"
            }
          ]
        }
      ],
      "title": "City Wise Total Collection Points",
      "type": "table"
    }
  ],
  "refresh": false,
  "schemaVersion": 36,
  "style": "dark",
  "tags": [],
  "templating": {
    "list": [
      {
        "current": {},
        "datasource": {
          "type": "postgres",
          "uid": "${DS_POSTGRESQL-EPERMITUAT31032023}"
        },
        "definition": "select market_code from un_market_mstr;",
        "hide": 0,
        "includeAll": true,
        "multi": true,
        "name": "RMC",
        "options": [],
        "query": "select market_code from un_market_mstr;",
        "refresh": 1,
        "regex": "",
        "skipUrlSync": false,
        "sort": 1,
        "type": "query"
      }
    ]
  },
  "time": {
    "from": "2020-02-29T18:30:00.000Z",
    "to": "2023-03-31T18:29:59.000Z"
  },
  "timepicker": {},
  "timezone": "",
  "title": "epermituat31032023.v1",
  "uid": "gy2oMjD4z1",
  "version": 128,
  "weekStart": "",
  "gnetId": 18749,
  "description": "example"
}