dense-rank

Need help trying to RANK with a GROUP BY.

Hi folks, I'm having trouble trying to rank each of our students, by the homegroup they are in. Example fake data. HomeGroup 1. Team RED 2. Team BLUE 3. Team Skeet 4. Team GREEN Students 1. John, Score - 34, Team RED 2. Jill, Score - 87.3, Team RED 3. Fred, Score - 41, Team GREEN 4. Jane, Score 93, Team BLUE ... etc. My output is ...

Dense_Rank() alternative in sql server 2000?(Set based)

Actually, I have the task of finding the employees based on the salary rank. So I used Dense_Rank() and got the answer. Initially I was told to solve in SQL SERVER 2005. Later on they changed the requirement and is saying that the query should run in SQL SERVER 2000 also. I solved that using a while loop. But they are saying that...

Join single row from a table in MySQL

I have two tables players and scores. I want to generate a report that looks something like this: player first score points foo 2010-05-20 19 bar 2010-04-15 29 baz 2010-02-04 13 Right now, my query looks something like this: select p.name player, m...

ranking function structure

Hi , I know the DENSE_RANK() function of the ranking function and its job well. But always I only write this function’s name and it do its job implicitly can cannot see how it work explicitly and I like to see its structure which do the operations within this function with T_SQL language. Would you please help me with it. ...

How to generate these two reports with MySQL?

My Schema I have the following tables table notes/example values ------------------------------------------------ users ( id email # "[email protected]" ) games ( id name # "Space Invaders", "Asteroids", "Centipede" ) players ( ...