File tree Expand file tree Collapse file tree 2 files changed +9
-12
lines changed
Expand file tree Collapse file tree 2 files changed +9
-12
lines changed Original file line number Diff line number Diff line change 1-
2- SELECT
3- SUM (application_chat_record .message_tokens + application_chat_record .answer_tokens ) as " token_usage" ,
4- COALESCE(application_chat .asker - >> ' username' , ' 游客' ) as " username"
5- FROM
6- application_chat_record application_chat_record
7- LEFT JOIN application_chat application_chat ON application_chat." id" = application_chat_record .chat_id
8- ${default_sql}
1+ SELECT SUM (application_chat_record .message_tokens + application_chat_record .answer_tokens ) as " token_usage" ,
2+ MAX (COALESCE(application_chat .asker - >> ' username' , ' 游客' )) as " username"
3+ FROM application_chat_record application_chat_record
4+ LEFT JOIN application_chat application_chat ON application_chat." id" = application_chat_record .chat_id
5+ ${default_sql}
96GROUP BY
10- COALESCE( application_chat .asker - >> ' username ' , ' 游客 ' )
7+ application_chat .chat_user_id
118ORDER BY
129 " token_usage" DESC
Original file line number Diff line number Diff line change 1- SELECT COUNT (application_chat_record." id" ) AS chat_record_count,
2- COALESCE(application_chat .asker - >> ' username' , ' 游客' ) AS username
1+ SELECT COUNT (application_chat_record." id" ) AS chat_record_count,
2+ MAX ( COALESCE(application_chat .asker - >> ' username' , ' 游客' )) as " username"
33FROM application_chat_record application_chat_record
44 LEFT JOIN application_chat application_chat ON application_chat." id" = application_chat_record .chat_id
55 ${default_sql}
66GROUP BY
7- COALESCE ( application_chat .asker - >> ' username ' , ' 游客 ' )
7+ application_chat .chat_user_id
88ORDER BY
99 chat_record_count DESC ,
1010 username ASC
You can’t perform that action at this time.
0 commit comments