{
  "db_name": "PostgreSQL",
  "query": "\n            SELECT\n                (CASE WHEN $4::bool AND $5::bool THEN\n                    (SELECT COUNT(*) FROM batch_aggregates\n                     WHERE user_id = $1\n                       AND ($2::timestamptz IS NULL OR created_at >= $2)\n                       AND ($3::timestamptz IS NULL OR created_at <= $3))\n                ELSE 0 END)\n                +\n                (SELECT COUNT(*) FROM credits_transactions\n                 WHERE user_id = $1\n                   AND fusillade_batch_id IS NULL\n                   AND ($6::text IS NULL OR description ILIKE '%' || $6 || '%')\n                   AND ($7::text[] IS NULL OR transaction_type::text = ANY($7))\n                   AND ($2::timestamptz IS NULL OR created_at >= $2)\n                   AND ($3::timestamptz IS NULL OR created_at <= $3))\n            as \"count!\"\n            ",
  "describe": {
    "columns": [
      {
        "ordinal": 0,
        "name": "count!",
        "type_info": "Int8"
      }
    ],
    "parameters": {
      "Left": [
        "Uuid",
        "Timestamptz",
        "Timestamptz",
        "Bool",
        "Bool",
        "Text",
        "TextArray"
      ]
    },
    "nullable": [
      null
    ]
  },
  "hash": "1280f060d5a9a502563e3b80f31ba53e465ad720a1cd06bcfc5d8e629adf963e"
}
