Hi,
I am trying to figure our a way to calculate rank. Right now it simply takes ratio of wins / losses of each individual entry, so e.g. one won 99 times out of a 100, it has 99% winning rank. BUT if an entry won 1 out of total 1 votes, it will have a 100% winning rank, but definitely it can't be higher that of the one that won 99 time...
The following query:
SELECT
year, id, rate
FROM h
WHERE year BETWEEN 2000 AND 2009
AND id IN (SELECT rid FROM table2)
GROUP BY id, year
ORDER BY id, rate DESC
yields:
year id rate
2006 p01 8
2003 p01 7.4
2008 p01 6.8
2001 p01 5.9
2007 p01 5.3
2009 p01 4.4
2002 p01 3.9
2004 p01 3.5
2005 p01 2.1
2000 p...
In a scenario where I have a table like so:
int id (PK)
int staff_id
int skill_id
bit mainskill
I want to select only ONE record for each staff member (represented by staff_id) listing their main skill as represented by a (1) in mainskill. If no main skill is present, I want to return any of the skill records for that staff member. Fo...
Hi everyone, I've been stuck with the rather famous problem of ranking students by grade for a couple weeks now, and while I've learned much, I still haven't solved my problem (the ranks are generated, but the process is too slow):
I have a large table (320,000 rows) that contains the student codes (serves as an identifier, instead of t...
I have a table called 'highscores' that looks like this.
id udid name score
1 1111 Mike 200
2 3333 Joe 300
3 4444 Billy 50
4 0000 Loser 10
5 DDDD Face 400
Given a specific udid, I want to return the rank of that row by their score...
I have a MySQL table with many rows. The table has a popularity column. If I sort by popularity, I can get the rank of each item. Is it possible to retrieve the rank of a particular item without sorting the entire table? I don't think so. Is that correct?
An alternative would be to create a new column for storing rank, sort the entire t...
I am building a site with a ton of 1999 style capitalization of navigation and headings. I have been simply adding in the text content as it appears (capitalized), but the other designer on the project insists on using lower case text in his HTML and capitalizing it with an applied style:
.tedious {text-transform:uppercase;}
I underst...
Hi there, I need a rank system ( like stars etc.) for my website. Do you know eny scripts that are highly customizable? I would like to use it with a CMS, not as stand alone aplication. Any sugestions will be very helpful
...
Hi Everyone
I have the code below and I am trying to find out the top 10 servers used in the last month, but having issues, not very good with SQL. Need some help or advice if possible.
I got this working on top 10 Apps but cannot figure out how to make this happen for top 10 servers.
SELECT TOP 10 dbo_LU_SERVERNAME.SERVERNAME, Count(...
select *
from
(
select year,
week,
salesperson,
count(*) as transactions,
rank() over(partition by week order by count(*) desc) as ranking
from sales
where year = '2010',
group by year,
week,
salesperson
) temp
w...
is there any point in having
a robots.txt with just one line of content like below
User-agent: *
compared to not having it at all ?
...
I'm implementing a frontpage with "hot" stories based on a certain ranking algorithm. However, I can't figure out how to pass Appengine's datastore my own sort function (like I can in python with sort(key=ranking_function)). I want something like this:
class Story(db.Model):
user = db.ReferenceProperty(User)
text = db.TextProp...
Hello fellows -
I'm currently in the process of developing a digg-like Ruby on Rails application for my degree's Final Project and I'm stuck in the 5 point ranking algorithm.
There are a couple of factors that need to be involved, here's a breakdown :
Users
They'll have a personal 5 points ranking per category with 5 being the best ...
I have simple tbl_posts table with three columns (id, name, content)
I created fulltext index for name and content columns.
When I query it like:
SELECT *
FROM dbo.tbl_posts
WHERE FREETEXT ( *, 'search word' )
I want that the order for results will be ordered first by rank in column name and then my content
...
This is for http://cssfingerprint.com
I have a largish database (~100M rows) of websites. This includes both main domains (both 2LD and 3LD) and particular URLs scraped from those domains (whether hosted there [like most blogs] or only linked from it [like Digg], and with a reference to the host domain).
I also scrape the Alexa top mil...
hi,
i have the result of a ranking script in a foreach loop, sorted by the number of votes. is there a way to visualize this with a chart/graph tool? the results are in a table, so each "project" has its own
<tr><td>project name</td><td>4</td></tr>
i want to display the number of votes eg. 4, in a row underneath the written result. a...
I would like to know if there is any easy way to rank blog articles by counting how many times they have been retweeted / digg'ed / buzz'ed and if there is an existing api for it.
The idea would be to keep important 'stories' at the top of the blog timeline.
...
Hello guys,
For a school project, we'll have to implement a ranking system. However, we figured that a dumb rank average would suck: something that one user ranked 5 stars would have a better average that something 188 users ranked 4 stars, and that's just stupid.
So I'm wondering if any of you have an example algorithm of "smart" rank...
Hi, is it possible (a Google API or something) to get the ranking of a website given a search word? It's the code equivalent of doing a Google search for a word, then browsing through the results until you find the website you look for.
By ranking I mean the position in the pages found, e.g. the site is number 4000 when searching for s...
I have a table with these columns: win, los, id ...
I want to order the table by this index: win / ( win + los ) * 30 + win / SUM(win) * 70
and then to find the rank for two id's.
I'm not very good on mysql, so what I wrote is totally wrong. (It uses Perl + DBI + DBD::mysql):
$stmt=$con->prepare("SET @rk := 0");
$stmt=$con->prep...