Creating and managing polls

You can do it with data explorer. I asked the AI
“Is it possible to export the results of every single poll from different channel for reporting purposes using data explorer” and it gave this query:

SELECT  
    p.topic_id, 
    p.name AS poll_name,
    o.id AS option_id, 
    o.html AS option_text, 
    COUNT(v.id) AS vote_count
FROM polls p
JOIN poll_options o ON p.id = o.poll_id
LEFT JOIN poll_votes v ON o.id = v.poll_option_id
GROUP BY p.topic_id, p.name, o.id, o.html
ORDER BY p.topic_id, p.name, o.id;

it looks like it might work?

1 Like