AI SQL Query Generator from Database Schema

c450a601-2f3c-4cf5-afb5-6683b7dd44fb

Latency
605ms
Cost
$0.0000
Tokens
0
Status
success
gemini-2.5-flash-lite

Workflow Graph

Trace

[
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "b7c3ca47-11b3-4378-81fa-68b2f56b295e",
    "timestamp": 1780874430838
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874430838
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "b7c3ca47-11b3-4378-81fa-68b2f56b295e",
    "timestamp": 1780874430838
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "977c3a82-440b-4d44-9042-47a673bcb52c",
    "timestamp": 1780874430841
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874430841
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "977c3a82-440b-4d44-9042-47a673bcb52c",
    "timestamp": 1780874430841
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "c6e9c0e2-d238-4f0b-a4c8-2271f2c8b31b",
    "timestamp": 1780874430844
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874430844
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "c6e9c0e2-d238-4f0b-a4c8-2271f2c8b31b",
    "timestamp": 1780874430844
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "4c141ae8-d2d1-45c7-bb5d-f33841d3cee6",
    "timestamp": 1780874430846
  },
  {
    "data": {
      "mode": "write",
      "status": "ok",
      "service": "mysql",
      "latencyMs": 180,
      "operation": "executeQuery",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780874431029
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "4c141ae8-d2d1-45c7-bb5d-f33841d3cee6",
    "timestamp": 1780874431029
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "54fb3362-041b-4e4f-bfea-f0bc788d8dfd",
    "timestamp": 1780874431034
  },
  {
    "data": {
      "mode": "write",
      "status": "ok",
      "service": "mysql",
      "latencyMs": 180,
      "operation": "executeQuery",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780874431216
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "54fb3362-041b-4e4f-bfea-f0bc788d8dfd",
    "timestamp": 1780874431216
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "d55e841d-11ed-4ce2-8c8e-840bd807ff2c",
    "timestamp": 1780874431221
  },
  {
    "data": {
      "inputKeys": [],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780874431221
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "d55e841d-11ed-4ce2-8c8e-840bd807ff2c",
    "timestamp": 1780874431221
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "ca8d30d6-c1f1-4e89-8cd5-ea3648dc3b0c",
    "timestamp": 1780874431224
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431224
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "ca8d30d6-c1f1-4e89-8cd5-ea3648dc3b0c",
    "timestamp": 1780874431224
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "2d89f901-d4e7-4fea-bd69-20b518280bbc",
    "timestamp": 1780874431227
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431227
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "2d89f901-d4e7-4fea-bd69-20b518280bbc",
    "timestamp": 1780874431227
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "04511c4f-44fa-4c23-87af-54d959e6cb2c",
    "timestamp": 1780874431229
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431229
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "04511c4f-44fa-4c23-87af-54d959e6cb2c",
    "timestamp": 1780874431229
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "96f129c0-d1d4-4cbf-a24d-0b0cea18a229",
    "timestamp": 1780874431232
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431232
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "96f129c0-d1d4-4cbf-a24d-0b0cea18a229",
    "timestamp": 1780874431232
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "4d993ed9-3bbe-4bc3-9e5b-c3d738b0e714",
    "timestamp": 1780874431235
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431235
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "4d993ed9-3bbe-4bc3-9e5b-c3d738b0e714",
    "timestamp": 1780874431235
  },
  {
    "data": {
      "nodeType": "manualTrigger"
    },
    "event": "node_start",
    "nodeId": "c8ac730a-04ee-499d-b845-1149967d6aa2",
    "timestamp": 1780874431237
  },
  {
    "data": {
      "initialData": {
        "data": {
          "message": "Please generate a SQL query to retrieve the usernames of all users who have placed at least one order."
        },
        "query": "SELECT DISTINCT u.username FROM users u JOIN orders o ON u.id = o.user_id;",
        "action": "generate_sql",
        "output": null,
        "schema": "CREATE TABLE users (id INT AUTO_INCREMENT PRIMARY KEY, username VARCHAR(255) NOT NULL, email VARCHAR(255) UNIQUE NOT NULL);\nCREATE TABLE products (id INT AUTO_INCREMENT PRIMARY KEY, name VARCHAR(255) NOT NULL, price DECIMAL(10, 2) NOT NULL);\nCREATE TABLE orders (id INT AUTO_INCREMENT PRIMARY KEY, user_id INT, product_id INT, quantity INT, order_date DATETIME DEFAULT CURRENT_TIMESTAMP, FOREIGN KEY (user_id) REFERENCES users(id), FOREIGN KEY (product_id) REFERENCES products(id));",
        "chatInput": "Show me all users who have placed an order.",
        "sessionId": "session_12345",
        "sqloutput": null,
        "output.match": null,
        "Tables_in_tttytdb2023": [
          "users",
          "products",
          "orders"
        ]
      }
    },
    "event": "triggered",
    "nodeId": "manualTrigger",
    "timestamp": 1780874431237
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "manualTrigger"
    },
    "event": "node_end",
    "nodeId": "c8ac730a-04ee-499d-b845-1149967d6aa2",
    "timestamp": 1780874431237
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "0cd425db-2a8e-4f48-b749-9a082e948395",
    "timestamp": 1780874431240
  },
  {
    "data": {
      "inputKeys": [],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780874431240
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "0cd425db-2a8e-4f48-b749-9a082e948395",
    "timestamp": 1780874431240
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "e4045e33-bb87-488d-8ccf-b4a94339a841",
    "timestamp": 1780874431242
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431242
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "e4045e33-bb87-488d-8ccf-b4a94339a841",
    "timestamp": 1780874431242
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "367ebe95-0b87-44f6-8392-33fe65446c24",
    "timestamp": 1780874431245
  },
  {
    "data": {
      "inputKeys": [],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780874431245
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "367ebe95-0b87-44f6-8392-33fe65446c24",
    "timestamp": 1780874431245
  },
  {
    "data": {
      "nodeType": "if"
    },
    "event": "node_start",
    "nodeId": "b856fe78-2435-4075-97f8-ecbeecf3e780",
    "timestamp": 1780874431247
  },
  {
    "event": "true branch",
    "nodeId": "if",
    "timestamp": 1780874431247
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "if"
    },
    "event": "node_end",
    "nodeId": "b856fe78-2435-4075-97f8-ecbeecf3e780",
    "timestamp": 1780874431247
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "cbb6d1e1-0a75-4b3a-89cd-6bd545b8d414",
    "timestamp": 1780874431249
  },
  {
    "data": {
      "inputKeys": [],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780874431249
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "cbb6d1e1-0a75-4b3a-89cd-6bd545b8d414",
    "timestamp": 1780874431249
  },
  {
    "data": {
      "nodeType": "integration"
    },
    "event": "node_start",
    "nodeId": "d958de24-84ef-4928-a7f3-32cada09a0eb",
    "timestamp": 1780874431250
  },
  {
    "data": {
      "mode": "write",
      "status": "ok",
      "service": "mysql",
      "latencyMs": 180,
      "operation": "executeQuery",
      "simulated": true
    },
    "event": "integration_mocked",
    "nodeId": "integration",
    "timestamp": 1780874431433
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "integration"
    },
    "event": "node_end",
    "nodeId": "d958de24-84ef-4928-a7f3-32cada09a0eb",
    "timestamp": 1780874431433
  },
  {
    "data": {
      "nodeType": "set"
    },
    "event": "node_start",
    "nodeId": "99a6dc03-1035-4866-81e4-11dc66bf98ec",
    "timestamp": 1780874431438
  },
  {
    "data": {
      "inputKeys": [],
      "mergeKeys": []
    },
    "event": "merged",
    "nodeId": "set",
    "timestamp": 1780874431438
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "set"
    },
    "event": "node_end",
    "nodeId": "99a6dc03-1035-4866-81e4-11dc66bf98ec",
    "timestamp": 1780874431438
  },
  {
    "data": {
      "nodeType": "merge"
    },
    "event": "node_start",
    "nodeId": "9380c2f6-15d9-43e4-80a2-3019bcf5ae04",
    "timestamp": 1780874431440
  },
  {
    "event": "no inputs, returning empty",
    "nodeId": "merge",
    "timestamp": 1780874431440
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "merge"
    },
    "event": "node_end",
    "nodeId": "9380c2f6-15d9-43e4-80a2-3019bcf5ae04",
    "timestamp": 1780874431440
  },
  {
    "data": {
      "nodeType": "passthrough"
    },
    "event": "node_start",
    "nodeId": "error-382cef4c",
    "timestamp": 1780874431443
  },
  {
    "data": {},
    "event": "noOp",
    "nodeId": "passthrough",
    "timestamp": 1780874431443
  },
  {
    "data": {
      "status": "ok",
      "nodeType": "passthrough"
    },
    "event": "node_end",
    "nodeId": "error-382cef4c",
    "timestamp": 1780874431443
  }
]