Need help using the count on the service

I have the following query

Select student_id, OM, TP, TM (rownum) count on PS (order by desc OM) of
(select
ER.student_id, sum (er.obtained_marks) OM, sum (ds.max_marks) TM,
TO_CHAR(sum(er.obtained_marks)/sum(DS.max_marks)*100,'990.00') TP
Of
tbl_exam_results er, tbl_date_sheet ds
where
DS.date_sheet_id = er.date_sheet_id and ds.class_id = 77 and ds.exam_id = 3 and ds.session_id = 1 group er.student_id
)

results in






< div style = "width: 889px" > < div class = "fielddata" > < div > ""


< div > STUDENT_ID OM TM TP PS
1825 291 300 97.00 1
3717 290 300 96,67 2
2122 289 300 96.33 3
3396 287 300 95.67 {color: #ff6600} * 5 & lt;-* {color}
4554 287 300 95.67 {color: #ff6600} * 5 & lt;-* {color}
1847 281 300 93,67 6
1789 279 300 93,00 7
5254 277 300 92,33 8
1836 258 300 86,00 9
4867 250 260 96,15 10
1786-249-300 83.00 11
4659 245 300 81,67 12
1835 241 300 80.33 * {color: #ff6600} 15 & lt;--{couleur} *.
1172 241 270 89.26* {color: #ff6600} 15 & lt;--{couleur} *.
3696 241 300 80.33 * {color: #ff6600} 15 & lt;--{couleur} *.
3865 234 300 78,00 16
5912 215 300 71,67 17
5913 204 300 68.00 * {color: #ff6600} 19 & lt;--{couleur} *.
3591 204 300 68.00 * {color: #ff6600} 19 & lt;--{couleur} *.
1830 184 250 73,60 20
< / div >
< / div >
< / div >
< / div >
< div style = "width: 889px" > < div class = "fielddata" > < div > ""
But I want to like this


< div > STUDENT_ID OM TM TP PS
1825 291 300 97.00 1
3717 290 300 96,67 2
2122 289 300 96.33 3
3396 287 300 95.67 * {color: #ff6600} 4 & lt; = {color}
4554 287 300 95.67 * {color: #ff6600} 4 & lt; = {color}
1847 281 300 93,67 {color: #ff6600} 5 the following entry {color}
1789 279 300 93,00 6
5254 277 300 92,33 7
1836 258 300 86,00 8
4867 250 260 96,15 9
1786-249-300 83.00 10
4659 245 300 81,67 11
1835 241 300 80.33 {color: #ff6600} * 12 & lt; = * {color}
1172 241 270 89,26 {color: #ff6600} * 12 & lt; = * {color}
3696 241 300 80.33 {color: #ff6600} * 12 & lt; = * {color}
3865 234 300 78,00 {color: #ff6600} 13 the following entry {color}
5912 215 300 71,67 14
5913 204 300 68.00 * {color: #ff6600} 15 & lt; = {color}
3591 204 300 68.00 * {color: #ff6600} 15 & lt; = {color}
1830 184 250 73,60 {color: #ff6600} 16 {color} {color: #ff6600} the following entry {color}

< / div >
Thanks in advance for any help
< / div >
< / div >
< / div >
< div style = "width: 889px" > < / div >
Published by: sabir786 on January 14, 2009 04:13

Published by: sabir786 on January 14, 2009 04:17

As I said earlier, I think the OP is after dense_rank:

WITH t AS (SELECT 1 om FROM dual UNION ALL
           SELECT 2 FROM dual UNION ALL
           SELECT 3 FROM dual UNION ALL
           SELECT 4 FROM dual UNION ALL
           SELECT 4 FROM dual UNION ALL
           SELECT 5 FROM dual)
SELECT om, COUNT(rownum) OVER (ORDER BY om) ps, dense_rank() over (order by om) ps2
FROM t;

OM     PS     PS2
1     1     1
2     2     2
3     3     3
4     5     4
4     5     4
5     6     5

Tags: Database

Similar Questions

  • I need help using the target path tool

    Hi all

    I realize that I need to keep all my code in the main storyline, so now I need serious help with targeting movieclips and buttons, when I use the target path tool (the viewfinder in the action script Panel) it allows me to navigate to the thing I want, but when I use his suggestion it very often does not work , and I find myself using trial and error to get by.  ICAN get stuff to work, but I really have no idea why or how I do it, sorry to be a N00B, but I really think that if I can work that I get somwhere.

    See you soon

    void

    subtlefly72 wrote:

    Thanks kglad,.

    OK, this is essentially what I did, but its been a bit hit and Miss, but maybe now, I can't see why, your last sentence

    of course, all of these objects have which existed at the time your code runs.

    So if I'm making refers to something within a mc and it does not exist on the first image, there will be an error?

    exactly.

    also, what is this.  Object() and Object (parent)?

    I have to be the use of these?

    not when using the code on the main timeline.  "This" refers to the current scope, which is for the code in the main storyline, the main timeline.  What follows is the same:

    This.MC and mc

    This.var1 and var1

    And again, I want to know why the target tool gives me a path that does not work?

    I can't tell you much about the tool to the target.  I never used it.  but I tried to test this afternoon and it seems to work fine to target a nested movieclip.  again, you must ensure that this object exists when your code runs so if you're targeting something on the frame 2 (or more) of a movieclip using the code on frame 1 of the main timeline, the reference may be correct, but the object does not exist when your code runs.  There are a number of ways to handle this, if this is your main problem.

  • Need help using the tabs of the apex to the universal theme.

    I tried using the enkitec boards to create tabs in page apex.

    But I'm unsucessfull and I used the apex as the version 5.

    The theme that I use is universal theme.

    https://www.enkitec.com/Apex/f?p=15300:30310:0:

    Also I'm tired the method too to create tabs below

    Creation of a region of the tab within a page in the APEX

    It's like

    In the HTML header, I'll add the code below

    <link rel="stylesheet" href="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/themes/redmond/jquery-ui.css" type="text/css" /> <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.js"> </script> <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.js"> </script> <script type="text/javascript"> $(function() {    $("#tabs").tabs();    $x("tabs").appendChild( $x("tabs-1"));    $x("tabs").appendChild( $x("tabs-2")); }); </script>

    Then I'll create 3 region.

    Region 1 > > > create a HTML region (REGION MODEL = MODEL number) and add the code below in the SOURCE of the REGION

    <div id="tabs"> <ul>    <li><a href="#tabs-1">Employee</a></li>    <li><a href="#tabs-2">Chart</a></li> </ul> </div>

    Region 2 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the region to REGION 2

    <div id="tabs-1">

    Add the code below in the bottom of the region to REGION 2

    </div>

    Region 3 > > > create HTML region... Add two fields to the region now, edit the region

    Add the code below in the header of the REGION 3 region

    <div id="tabs-2">

    Add the code below in the bottom of the REGION 3 region

    </div>

    Example: http://Apex.Oracle.com/pls/Apex/f?p=12060:7

    I used exactly the same code... except that my region 2 contains a REPORT instead of two text field and region 3 GRAPHICS instead of text field.

    Kind regards

    Shijesh

    -------

    Please reward the answer if it was useful / correct


    I used the enkitecs method to create tabs.

    Tabs have been created, but the fields were visible inside.

    Will soon be replicating the scenario of apex.oracle.com

    Maybe someone can help.

    At the same time if there is no easy way to create tabs in apex page please let me know.

    Thank you

    Paul

    Hi pauljohny100,

    pauljohny100 wrote:

    I'd like to learn more about the region view selector

    You have a good resource on it.

    Selector display region is type of region, which shows the navigation links in the form of hyperlinks button for regions where the attributes of the region-> region selector display are set to Yes. Œuvres similar to jQuery tabs.

    Reference: ApEx 4.0 region selector | iAdvise blog (it's blog when it was introduced first in APEX 4.0)

    I have not found any Oracle Documentation on this, but it's taken APEX oracle supported the region type.

    You will find that this implemented in various packaged for example P-Track applications.

    Kind regards

    Kiran

  • Need help using the access list blocking a single IP address

    Basically, I'm being attacked by a massive spammer. I managed to deny him access to our mail server, however, his repeated attempts to connect to the same server is in our file of e-mail magazine. What I want to do is set up a block for its specific IP address in our 2621 router. I tried a few different combinations using access-list, but nothing helped. Can anyone suggest something? Thank you!

    Joe

    Joe,

    If you know that the attack came from a particular ip address, you can create an extended access list and deny that IP.

    access-list 101 deny ip host host of attacker_ip_address e-mail_server_ip

    If the source ip address is random then you must put a sniffer or take a look in the syslog to see if there are any model ID as a string. You can then configure NBAR on the router to mark the package and then drop the packets.

    Here is a link that explains the procedure:

    http://www.Cisco.com/en/us/NetSol/ns110/ns170/ns171/ns128/networking_solutions_white_paper09186a008009c8ad.shtml

    Thank you

    Renault

  • Need help, use the control Timer my application does not start

    Hello guys

    I have problems, follow the example signals and Slots, but when my application is running, it does not start.

    If I delete all the code that deals with the Timer control, it's working again, my theory is that the CustomTimer library does not stunts

    Can you help me?

    Thank you very much

    My guess is many people have followed this during the first startup, I certainly did and it worked for me.

    It's probably something simple, missed, without seeing your code it's going to be difficult to diagnose.

    My first advice is always to check the log and see if messages are coming that may be related.

  • Need help using the intersect tool (Adobe Illustrator CS5)

    Currently, I'm learning to do a Fox in Adobe Illustrator CS5 a tutorial online, however the intersect tool in the area of pathfinder does not work the way I want. I have two pieces of the tail I'd like to set up to aid intersect, but it keeps cutting it incorrectly. Here's what it looks like before and after clicking on intersect:

    img 1.PNG
    After:
    img 2.PNG
    However, I tried to cut the end of the runway so that it looks like this:

    Someone please help and explain what I am doing wrong, the answers will be greatly appreciated. I choose the tail and the end of the tail, but when I type intersect, the tail basically everything disappears.

    There is always an effect applied to the tail. You must first expand appearance (in the menu object)

  • need help using the file .bin as floppy

    Hi all

    I have a file with the '.bin' extension, and I want to use it in the virtual floppy drive but not able to find the appropriate way to do it in vmware.

    as vmware accepts .flp or .img format, how can I convert my file in .bin format into the format?

    my host is windows without a floppy drive.

    Please suggest some suitable loophole.

    Thank you

    Abhishek

    progress
    I develop the flp to the size set with this command fsz.exe redboot.flp 1474560

    then I start the virtual machine, but it hangs as it did until I expanded the flp.
    So I doubt that the flp size is important.

    Then I looked... empty error message.
    Then, I created a VM with guestOS = 'other '.
    has no IDE vontrollers - this time, it starts and no longer crashes

    I was even able to assign an IP address and ping the VM - do not know if she can do anything whatsoever for further testing?

  • ThinkPad E530: Need help using the Windows 7 recovery partition


    Nice day.

    Everything I've read, so far, is that it is not possible to do something with the remnants of the recovery partition now that Windows 10 'touched' the system.

    A way to return to your original OEM image would be to contact the applicant recovery DVD and Support (info below). There may be a cost of handling.

    Kind regards.

  • Need help using the structure of the case

    I was wondering how to control a structure case if the condition is false. I tried to define if the entered string matches perform multiplication, or else if the input string is not just matches to retain the previous value. Directly to say take no action if the input string does not match.

    -lucky.

    Thank you much for the local variable solved my problem...

    -lucky

  • Need help using the Back button

    Is there a way to make the BB built to the "back" button go to the index.html screen and not just the last. I remember well seen this somewhere, but I've searched and searched and cannot find anywhere.
    Thank you.

    blackberry.system.event.onHardwareKey(blackberry.system.event.KEY_BACK,
        function() {
       window.parent.location.href='index.html';
       return false;
    });
    

    and in the config.xml file:

    
    
  • You need Internet Explorer 5.5 or higher for Windows to use the Services of eRestaurant

    You need Internet Explorer 5.5 or higher for Windows to use the Services of eRestaurant

    Best place for support on this issue would be here...

    http://altametrics.com/support

  • I used up to the allocation for the region 1 & 2 DVD for help. stuck on region 1 now. I need to use the two regions for my DVD. Help, please. Beryl

    I used up to the allocation for the region 1 & 2 DVD for help. Stuck on region 1 now.  I need to use the two regions for my DVD. Help, please. Beryl.

    It isn't a MS solution, there are solutions to third parties not supported by MS

  • Portege M700 - need help with the orientation of the display

    I'm a host of training courses; Unfortunately, I am disabled so I need to use the features of the tablet to avoid having to use flip charts. However, I ran into a few problems...

    * I have not worked on whether or not it is possible for the direction of the projector to change when you switch to Tablet mode. I would like to use the tablet to secondary landscape, but then it appears on the screen in reverse!
    * I don't seem to be able to get the Rotation utility button to work. It works as an alternative to the [ESC] but holding down (as mentioned in the instruction manual) does not seem to change the orientation.
    * How a TOSHIBA UK contact on operational issues? I look through the site of support here, but I found this excellent forum, it seems no way to contact Toshiba themselves.
    I hope someone can help me!

    See you soon,.
    Peter

    Hello

    may I ask if the operating system has been installed from scratch or recovery media? Another good question is to check if the new version of all the tools and drivers are installed to make sure that everything is up to date.
    What service pack is installed?

    With regard to your "contact-toshiba-problem:

    Toshiba itself cannot be contacted, you must work with the Service partner authorized in the United Kingdom, which means that you should look for an ASP, contact them and ask them what you need.
    Here´s a link to an index of ASP: http://eu.computers.toshiba-europe.com/cgi-bin/ToshibaCSG/download_whitepaper.jsp?service=EU&WHITEPAPER_ID=0 000000871

    Welcome them

  • one of my pc has placed on the bios supervisor password. now I need to use the bios settings to make some changes

    original title: supervisor password

    one of my pc has placed on the bios supervisor password. now I need to use the bios settings to make some changes, and I don't remember the password. What can I do to fix this?

    any practical advice will be much appreciated.

    Hello

    Check with support from the manufacturer of your system (manufacturer of motherboard for customized systems)
    or a real computer store (that makes its own domestic service).

    The Microsoft Community cannot help with password lost or forgotten by Microsoft Policy.

    Keep secure passwords - Microsoft strategy on move the passwords
    http://answers.Microsoft.com/en-us/Windows/Forum/Windows_7-security/keeping-passwords-secure-Microsoft-policy-on/39f56ef0-5d68-41AD-9daa-6e6019c25d37

    I hope this helps.
    --------------------------------------------------------------------------------------------
    Rob Brown - Microsoft MVP<- profile="" -="" windows="" experience :="" bicycle="" -="" mark="" twain="" said="" it="">

  • Schedule a task by using the service account

    To schedule tasks by using the service account and he could be executed in more than one PC. Please suggest and provide some example or screenshot.

    Hi Ravikumar,
     
    Thanks for posting your question in the Microsoft Community Forum.
     
    Based on the information, you find out to schedule tasks by using the service account and to run in multiple PCs.
    It would be useful that you can answer the question to help you further.
    Your system is connected to a domain?
     
    If your system is connected to the domain, the question you posted would be better suited for the IT Pro TechNet public. I would recommend posting your query in the TechNet Forums to get help:
    Let us know if you need help with Windows related issues. We will be happy to help you.

Maybe you are looking for