Modify ↓
Opened 15 years ago
Last modified 5 years ago
#6693 new enhancement
Suggested query for checking ratings
Reported by: | ibboard | Owned by: | |
---|---|---|---|
Priority: | low | Component: | FiveStarVotePlugin |
Severity: | normal | Keywords: | query |
Cc: | Trac Release: | 0.11 |
Description
As it stands, this hack creates all of the votes in a separate table. As I'm using the voting to rank tickets/bugs/features that people think are important, it is useful to get an overview of which tickets have what rating. My current query to do this is:
select id, type, summary, component, milestone, owner, (sum(v.vote)/count(v.resource))||'/5' as rating, count(v.resource) as votes from ticket t left join fivestarvote v on 'ticket/'||t.id = v.resource group by t.id order by rating desc
It might be useful to include something like that in the default install, if possible, so that people can have easy access to the information.
Attachments (0)
Change History (3)
comment:1 Changed 14 years ago by
Owner: | changed from Dav Glass to Ryan J Ollos |
---|
comment:2 Changed 12 years ago by
comment:3 Changed 5 years ago by
Owner: | Ryan J Ollos deleted |
---|
Note: See
TracTickets for help on using
tickets.
An example report should be include, sure.
But note that moving towards an improved db schema like done for VotePlugin lately will obsolete non-portable string-concatenation inside the report SQL and save the hassle of providing db backend-specific versions of the report. The currently proposed statement will not work with MySQL IIRC.