diff --git a/demo/web/server.py b/demo/web/server.py index 28781b2..be5fbcd 100644 --- a/demo/web/server.py +++ b/demo/web/server.py @@ -712,7 +712,7 @@ def list_conversations( try: with conn.cursor() as cur: sql = """ - SELECT DISTINCT cu.id, cu.customer_name, s.name AS salesperson_name, + SELECT cu.id, cu.customer_name, s.name AS salesperson_name, cu.industry, cu.intent_level, cu.stage, cu.summary, cu.key_points, cu.objections, cu.next_action, cu.key_needs, cu.last_analysis, @@ -742,8 +742,8 @@ def list_conversations( GROUP BY cu.id, cu.customer_name, s.name, cu.industry, cu.intent_level, cu.stage, cu.summary, cu.key_points, cu.objections, cu.next_action, - cu.key_needs, cu.last_analysis - ORDER BY min(cu.salesperson_id), cu.id + cu.key_needs, cu.last_analysis, cu.salesperson_id + ORDER BY cu.salesperson_id, cu.id """ cur.execute(sql, params)