How can I see Survey Results or Responses

The survey plugin does not have any backend UX at the moment to see the survey results. For that, we rely on Data Explorer queries. Example:

-- [params]
-- text :survey_name = survey

SELECT s.id, s.name, s.post_id, sf.question, COALESCE(sr.value, sfo.html) AS value, sr.user_id, sr.created_at as responded_at
FROM surveys s
JOIN survey_fields sf ON sf.survey_id = s.id
JOIN survey_responses sr ON sr.survey_field_id = sf.id
LEFT JOIN survey_field_options sfo ON sfo.id = sr.survey_field_option_id
WHERE s.name = :survey_name
ORDER BY s.id DESC
5 Likes