4 ms·
Try a Bayesian sort. You will get a better result. SELECT * EXCLUDE (titleType, primaryTitle, language) FROM 'imdb01-11-2024.parquet' WHERE (region is null an
by nzealand 2y ago
Try a Bayesian sort.
You will get a better result.
SELECT * EXCLUDE (titleType, primaryTitle, language)
FROM 'imdb01-11-2024.parquet'
WHERE
(region is null and
titleType = 'movie')
ORDER BY
( (numVotes * averageRating)+(1000007))/ (numVotes+1000000) desc
LIMIT 100
- afiodorov 2y agoThat's awesome. Care to explain? Looks like Laplace estimator of some kind? P.S. Query sharing is supported: https://www.imdb-sql.com/?query=SELECT+*+EXCLUDE+%28titleType%2C+primaryTitle%2C+language%29%0AFROM+%27imdb01-11-2024.parquet%27%0AWHERE%0A++%28region+is+null+and+titleType+%3D+%27movie%27+and+startYear+%3E%3D+2015%29%0AORDER+BY+%28%0A%28numVotes+*+averageRating%29%2B700000%29%2F+%28numVotes%2B100000%29+desc%0ALIMIT+100 https://www.imdb-sql.com/?query=SELECT+*+EXCLUDE+%28titleTyp...
- afiodorov 2y agoAh 7 might have been a typo. May be it was meant to be *7? Then that's exactly the Laplace estimator. We start with a prior of 1_000_000 votes of 7.0 and then adjust as we accumulate real votes.
- nzealand 2y agoYup. The correct query is: SELECT * EXCLUDE (titleType, primaryTitle, language) FROM 'imdb01-11-2024.parquet' WHERE (region is null and titleType = 'movie') ORDER BY ( (numVotes * averageRating)+(100000 * 7))/ (numVotes+100000) desc LIMIT 100