0 ?
round(($survey['completed_responses'] / $survey['total_responses']) * 100, 1) : 0;
// 평균 응답 시간 계산
$avg_time_sql = "
SELECT AVG(TIMESTAMPDIFF(MINUTE, sr_started_at, sr_completed_at)) as avg_minutes
FROM survey_responses
WHERE sv_id = '{$survey['sv_id']}'
AND sr_status = 'completed'
AND sr_completed_at IS NOT NULL
";
$avg_time_result = sql_fetch($avg_time_sql);
$avg_response_time = round($avg_time_result['avg_minutes'] ?? 0, 1);
?>