{
  "db_name": "PostgreSQL",
  "query": "\n        SELECT\n            model,\n            COUNT(*) as total_requests,\n            AVG(duration_ms)::float8 as avg_latency_ms,\n            COALESCE(SUM(prompt_tokens), 0)::bigint as total_input_tokens,\n            COALESCE(SUM(completion_tokens), 0)::bigint as total_output_tokens,\n            MAX(timestamp) as last_active_at\n        FROM http_analytics\n        WHERE model = ANY($1)\n        GROUP BY model\n        ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "model",
        "type_info": "Text"
      },
      {
        "ordinal": 1,
        "name": "total_requests",
        "type_info": "Int8"
      },
      {
        "ordinal": 2,
        "name": "avg_latency_ms",
        "type_info": "Float8"
      },
      {
        "ordinal": 3,
        "name": "total_input_tokens",
        "type_info": "Int8"
      },
      {
        "ordinal": 4,
        "name": "total_output_tokens",
        "type_info": "Int8"
      },
      {
        "ordinal": 5,
        "name": "last_active_at",
        "type_info": "Timestamptz"
      }
    ],
    "parameters": {
      "Left": [
        "TextArray"
      ]
    },
    "nullable": [
      true,
      null,
      null,
      null,
      null,
      null
    ]
  },
  "hash": "c2371dcc4d4eea09d3aea11848f4604d23135ea1972dcf9b66c7bba286d838a2"
}
