{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                date_trunc('hour', timestamp) as timestamp,\n                COUNT(*) as requests_count,\n                COALESCE(SUM(prompt_tokens), 0)::bigint as input_tokens,\n                COALESCE(SUM(completion_tokens), 0)::bigint as output_tokens,\n                AVG(duration_ms)::float8 as avg_latency_ms,\n                PERCENTILE_CONT(0.95) WITHIN GROUP (ORDER BY duration_ms)::float8 as p95_latency_ms,\n                PERCENTILE_CONT(0.99) WITHIN GROUP (ORDER BY duration_ms)::float8 as p99_latency_ms\n            FROM http_analytics\n            WHERE timestamp >= $1 AND timestamp <= $2\n            GROUP BY date_trunc('hour', timestamp)\n            ORDER BY timestamp\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "timestamp",
        "type_info": "Timestamptz"
      },
      {
        "ordinal": 1,
        "name": "requests_count",
        "type_info": "Int8"
      },
      {
        "ordinal": 2,
        "name": "input_tokens",
        "type_info": "Int8"
      },
      {
        "ordinal": 3,
        "name": "output_tokens",
        "type_info": "Int8"
      },
      {
        "ordinal": 4,
        "name": "avg_latency_ms",
        "type_info": "Float8"
      },
      {
        "ordinal": 5,
        "name": "p95_latency_ms",
        "type_info": "Float8"
      },
      {
        "ordinal": 6,
        "name": "p99_latency_ms",
        "type_info": "Float8"
      }
    ],
    "parameters": {
      "Left": [
        "Timestamptz",
        "Timestamptz"
      ]
    },
    "nullable": [
      null,
      null,
      null,
      null,
      null,
      null,
      null
    ]
  },
  "hash": "9b30403d16c54d03fa3a91a6fa3690cff08c5c717beecd1a85ed04e017270093"
}
