My database has been primed with a bunch of questions, and I'd like to focus the answering on those questions that are getting the most views. I've been poking around the schema a bit but I can't yet determine how I might write a query that says "Show me questions ordered by number of views, from highest to lowest". Can anybody help me out? Thanks!

asked 23 May '11, 21:32

dmorin's gravatar image

dmorin
36237
accept rate: 0%


I think the "hottest" query sorts by number of views - but is limited to those created or modified in the last 24 hours. If that's the case, then you could use that as a starting point, and modify it to remove the time condition. Search for "hottest" in the source code and see what you find

link

answered 24 May '11, 01:47

Andrew_S's gravatar image

Andrew_S ♦
5.6k45674
accept rate: 21%

Your answer
toggle preview

Follow this question

By Email:

Once you sign in you will be able to subscribe for any updates here

By RSS:

Answers

Answers and Comments

Markdown Basics

  • *italic* or _italic_
  • **bold** or __bold__
  • link:[text](http://url.com/ "title")
  • image?![alt text](/path/img.jpg "title")
  • numbered list: 1. Foo 2. Bar
  • to add a line break simply add two spaces to where you would like the new line to be.
  • basic HTML tags are also supported

Tags:

×62
×12
×4

Asked: 23 May '11, 21:32

Seen: 823 times

Last updated: 24 May '11, 01:47

powered by OSQA