Home » SQL & PL/SQL » SQL & PL/SQL » oracle developer (oracle developer 11g)
oracle developer [message #581675] Tue, 09 April 2013 13:34 Go to next message
tahsan007
Messages: 1
Registered: April 2013
Location: chittagong
Junior Member

"
Dear all expert pls help me

how can i solve this problem

I have a SQL DB with the following fields:
... ID - INT
SCORE INT
TIMESPENT INT
QUIZLEVEL INT
QUIZTYPE STRING
NAME STRING
I would like to be able to show the top scores (By unique students NAME) based on a calculated field called ADJUSTEDSCORE. ( I don't want to see Bob Smith with all top 10 scores just 1 of his)
ADJUSTEDSCORE = ((30-TIMESPENT)*10) +Score
I would like to rank these High to low for the top 10 scores, also I need to keep the quiz types separate and the levels separate.
For example QUIZTYPE= History and QUIZLEVEL=1 I would like to be able to see a list of the top scores.See More
"

Re: oracle developer [message #581676 is a reply to message #581675] Tue, 09 April 2013 13:46 Go to previous messageGo to next message
Michel Cadot
Messages: 57612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
Welcome to the forum.

With any SQL or PL/SQL question, please, Post a working Test case: create table (including all constraints) and insert statements along with the result you want with these data then we will be able work with your table and data. Explain with words and sentences the rules that lead to this result.

Please read OraFAQ Forum Guide and How to use [code] tags and make your code easier to read.
Make sure that lines of code do not exceed 80 characters when you format.
Indent the code, use code tags and align the columns in result.
Use the "Preview Message" or "Preview Quick Reply" button to verify.
Also always post your Oracle version, with 4 decimals.

Regards
Michel
Re: oracle developer [message #581705 is a reply to message #581676] Wed, 10 April 2013 01:12 Go to previous messageGo to next message
Littlefoot
Messages: 18828
Registered: June 2005
Location: Croatia, Europe
Senior Member
Account Moderator
This looks like a Top N problem. See whether information behind that link help.
Re: oracle developer [message #581707 is a reply to message #581705] Wed, 10 April 2013 01:26 Go to previous message
Michel Cadot
Messages: 57612
Registered: March 2007
Location: Nanterre, France, http://...
Senior Member
Account Moderator
And also Top N.

Regards
Michel
Previous Topic: regexp_replace multiple replace - at the end of the string
Next Topic: Update table removing first 2 digits from a column
Goto Forum:
  


Current Time: Sat Apr 19 03:16:05 CDT 2014

Total time taken to generate the page: 0.08708 seconds