peixue-dev/Archive/[一次性]检查提现记录-2026-01-31.sql

33 lines
644 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.

-- 检查提现记录表结构和数据
-- 日期: 2026-01-31
-- 1. 查看提现记录表结构
DESC withdraw;
-- 2. 查看所有提现记录
SELECT
id,
teacher_id,
withdraw_no,
amount,
status,
account_type,
account_name,
apply_time,
approve_time,
create_time
FROM withdraw
ORDER BY create_time DESC;
-- 3. 按状态统计提现记录
SELECT
status,
COUNT(*) as count,
SUM(amount) as total_amount
FROM withdraw
WHERE deleted = 0
GROUP BY status;
-- 4. 查看某个服务商的提现记录(替换 teacher_id
-- SELECT * FROM withdraw WHERE teacher_id = ? ORDER BY create_time DESC;