更新 sql.md
This commit is contained in:
@@ -45,3 +45,19 @@ where
|
|||||||
`client_id` = '客户端ID'
|
`client_id` = '客户端ID'
|
||||||
);
|
);
|
||||||
```
|
```
|
||||||
|
|
||||||
|
## 查智能体对话日志
|
||||||
|
|
||||||
|
1. 查询所有切片号,假设查询出来的`part`是[1,2]
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select part from log_agent_chat where del_flag = '0';
|
||||||
|
```
|
||||||
|
|
||||||
|
2. 根据切片号查询并合并各个切片表的数据
|
||||||
|
|
||||||
|
```sql
|
||||||
|
select * from log_agent_chat_1 where chat_window_id = <会话ID>
|
||||||
|
UNION ALL
|
||||||
|
select * from log_agent_chat_2 where chat_window_id = <会话ID>
|
||||||
|
```
|
||||||
Reference in New Issue
Block a user