HNQ update

This commit is contained in:
Glorfindel 2018-11-10 14:26:39 +01:00
parent a7be305b21
commit 6535153859

View file

@ -1,4 +1,4 @@
SELECT q.site, q.question, q.timestamp, q.hotness,
SELECT q.timestamp, q.hotness,
(LEAST(COUNT(a.*), 10) * (q.up_votes - q.down_votes) / 5.0 + SUM(a.up_votes - a.down_votes)) /
(GREATEST(DATE_PART('day', q.timestamp - qq.createddate) * 24 +
DATE_PART('hour', q.timestamp - qq.createddate) + 1, 6) ^ 1.4) *
@ -17,6 +17,6 @@ SELECT q.site, q.question, q.timestamp, q.hotness,
INNER JOIN sites AS s ON q.site = s.name
INNER JOIN snapshots_answers AS a
ON q.site = a.site AND q.question = a.question AND q.timestamp = a.timestamp
WHERE q.timestamp = '2018-11-08 23:45'
WHERE q.site = 'history' AND q.question = 49243
GROUP BY q.site, q.question, q.timestamp, qq.createddate, s.visits
ORDER BY q.hotness DESC
ORDER BY q.timestamp DESC