# Is it possible to keep the votes history of a poll?

**URL:** https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224
**Category:** Support
**Created:** [September 1, 2017, 7:22pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224 "2017-09-01T19:22:58Z")
**Posts on this page:** 9
**Page:** 1

<div class="post-metadata">

### Author: ![isdemo](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@isdemo](https://meta.discourse.org/u/isdemo)
#### Post date: [September 1, 2017, 7:22pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/1 "2017-09-01T19:22:58Z")

</div>

Is it possible to keep the votes history of a poll?

_Poll ([view on site](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/1))_

If the votes history is kept somewhere, can you show it somehow?  
Do I need a plugin for that?

---

<div class="post-metadata">

### Author: ![tobiaseigen](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/tobiaseigen/32/539204_2.png) [@tobiaseigen](https://meta.discourse.org/u/tobiaseigen)
#### Post date: [September 1, 2017, 7:27pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/2 "2017-09-01T19:27:24Z")

</div>

Take a look at this post:

> [@Is it possible to see who voted in polls?](https://meta.discourse.org/t/is-it-possible-to-see-who-voted-in-polls/27064/12):
>
> You can run the following query to get a list of users who voted and their selected poll options. Please choose the appropriate query for your Discourse version. Query for Discourse v2.2.0.beta5 and newer -- [params] -- post\_id :post\_id -- text :poll\_name = poll SELECT u.id AS user\_id, u.username, v.poll\_option\_id AS option\_id, o.html AS option\_html FROM polls p JOIN poll\_votes v ON (p.id = v.poll\_id) JOIN poll\_options o ON (o.id = v.poll\_option\_id) JOIN users u ON (v.use…

---

<div class="post-metadata">

### Author: ![isdemo](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@isdemo](https://meta.discourse.org/u/isdemo)
#### Post date: [September 1, 2017, 7:46pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/3 "2017-09-01T19:46:09Z")

</div>

So is it possible to somehow discover and present the below info from the poll I just created?

1/9/2017 12:25  
Is it possible to keep the votes history of a poll?  
0 “yes”, 0 “no”, 1 “I dont know”, 0 “other”

1/9/2017 12:45  
Is it possible to keep the votes history of a poll?  
1 “yes”, 0 “no”, 1 “I dont know”, 0 “other”

e.t.c.

Could you please answer to me on that, because I dont understand the code of the link you provided.

---

<div class="post-metadata">

### Author: ![pfaffman](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/pfaffman/32/120154_2.png) [@pfaffman](https://meta.discourse.org/u/pfaffman)
#### Post date: [September 1, 2017, 8:06pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/4 "2017-09-01T20:06:34Z")

</div>

> [@isdemo](#):
>
> Could you please answer to me on that, because I dont understand the code of the link you provided.

You need to have the [Discourse Data Explorer](https://meta.discourse.org/t/data-explorer-plugin/32566) installed. Then you paste that query into [Data Explorer](https://meta.discourse.org/t/32566?silent=true).

Does that help?

---

<div class="post-metadata">

### Author: ![isdemo](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@isdemo](https://meta.discourse.org/u/isdemo)
#### Post date: [September 1, 2017, 8:14pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/5 "2017-09-01T20:14:47Z")

</div>

> [@pfaffman](#):
>
> > [@isdemo](#):
> >
> > Could you please answer to me on that, because I dont understand the code of the link you provided.
> 
> You need to have the [Discourse Data Explorer](https://meta.discourse.org/t/data-explorer-plugin/32566) installed. Then you paste that query into [Data Explorer](https://meta.discourse.org/t/32566?silent=true).
> 
> Does that help?

It helps a lot. But there isnt a plugin which can do that. Correct?  
Everytime I have to execute the sql query, then cut and paste the result somewhere.  
This is the only way to do that, right?

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [September 1, 2017, 8:23pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/6 "2017-09-01T20:23:53Z")

</div>

You don’t need to cut and paste. You can download the results as a csv file

---

<div class="post-metadata">

### Author: ![isdemo](https://avatars.discourse-cdn.com/v4/letter/i/c77e96/32.png) [@isdemo](https://meta.discourse.org/u/isdemo)
#### Post date: [September 2, 2017, 10:30pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/7 "2017-09-02T22:30:05Z")

</div>

Thats great.  
But in case I want to present this information online in my site, and for every possible poll posted in the discussion, there isnt something ready , is it?  
Is there a way to expose the query results to regular users?  
I have to write the plugin for it, right?

---

<div class="post-metadata">

### Author: ![dax](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/dax/32/244677_2.png) [@dax](https://meta.discourse.org/u/dax)
#### Post date: [September 2, 2017, 10:37pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/8 "2017-09-02T22:37:39Z")

</div>

Discourse now support markdown tables,so the simplest thing I would do at your place is to copy the results from your csv file here [Markdown Tables generator - TablesGenerator.com](http://www.tablesgenerator.com/markdown_tables) , generate a markdown table (no need to copy and paste single cells you can paste whole rows or columns), and then post it to a topic.

---

<div class="post-metadata">

### Author: ![codinghorror](https://sea3.discourse-cdn.com/meta/user_avatar/meta.discourse.org/codinghorror/32/110067_2.png) [@codinghorror](https://meta.discourse.org/u/codinghorror)
#### Post date: [April 24, 2020, 11:29pm UTC](https://meta.discourse.org/t/is-it-possible-to-keep-the-votes-history-of-a-poll/69224/15 "2020-04-24T23:29:16Z")

</div>


