peixue-dev/Archive/[一次性]检查成长记录数据-2026-01-28.sql

27 lines
708 B
SQL
Raw Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

-- 检查成长记录表中的数据
SELECT
id,
order_id AS '订单ID',
teacher_id AS '陪伴员ID',
student_id AS '学生ID',
student_name AS '学生姓名',
record_date AS '记录日期',
record_type AS '记录类型',
LEFT(content, 50) AS '反馈内容前50字',
LEFT(supplement, 50) AS '管理师补充前50字',
create_time AS '创建时间',
update_time AS '更新时间'
FROM growth_record
WHERE deleted = 0
ORDER BY create_time DESC
LIMIT 20;
-- 统计成长记录数量
SELECT
record_type AS '记录类型',
COUNT(*) AS '数量',
COUNT(supplement) AS '已补充数量'
FROM growth_record
WHERE deleted = 0
GROUP BY record_type;