Query for selecting the 4 highest marks of the student

query for selecting the 4 highest marks of the student

Guys dont start an argument,
tey this one; please
Hi,
Try this
Top 4
Select ename,
sale
From dept d,
emp e1
Where d.deptno = e1.deptno
And &p > (Select Count(e2.sal)
From emp e2
Where e2.sal > e1.sal
And e2.deptno = e1.deptno
Order By 1,2
Bottom 4
Select ename,
sale
From dept d,
emp e1
Where d.deptno = e1.deptno
And &p > (Select Count(e2.sal)
From emp e2
Where e2.sal < e1.sal
And e2.deptno = e1.deptno
Order By 1, 2
&P you use any value say 3,4,5,6
This is top N analysis
Regards
Umesh

Similar Messages

  • Query for FormSubmit data by ID via the SOAP API

    When I submit a form entry via the SOAP API request 'Create' it get an ID as well as the Form Type data in return:
    <CreateResponse xmlns="https://secure.eloqua.com/API/1.2">
      <CreateResult xmlns:i="http://www.w3.org/2001/XMLSchema-instance">
           <CreateResult>
                <EntityType>
                     <ID>21</ID>
                     <Name>aherghaewForm</Name>
                     <Type>Form</Type>
                </EntityType>
                <Errors/>
                <ID>3</ID>
           </CreateResult>
      </CreateResult>
    </CreateResponse>
    However, I can't seem to query for that ID. When using the request 'Query'
    <ns:Query>
      <ns:eloquaType>
           <ns:ID>21</ns:ID>
           <ns:Type>Form</ns:Type>
      </ns:eloquaType>
      <ns:searchQuery>ID='3'</ns:searchQuery>
      <ns:pageNumber>1</ns:pageNumber>
      <ns:pageSize>20</ns:pageSize>
    </ns:Query>
    I receive the following Error:
    The search query you provided is invalid: 'id' is invalid.
    As the field 'ID' is not part of the FieldValueCollection, this outcome is not unexpected, but unfortunate, as it would greatly simplify querying for data that was just submitted. Querying for a field that is part of the FieldValueCollection delivers correct results.
    Is there a way to do just that, or do i have to follow another approach to retrieve FormSubmit data?
    Thanks,
    Felix

    OK. I see column X logic now:
    SQL> select  id,
      2          name,
      3          case when instr(sys_connect_by_path(id,',') || ',',',4,') > 0 then 'X' else 'Y' end x
      4    from  worker
      5    start with id in (
      6                      select  id
      7                        from  worker
      8                        where boss_id is null
      9                        start with id = 4
    10                        connect by prior boss_id = id
    11                      )
    12    connect by prior id = boss_id
    13  /
            ID NAME                             X
             1 Mennan                           Y
             2 Ahmet                            Y
             3 Akin                             Y
             4 Ayse                             X
             5 Aylin                            X
             6 Selim                            Y
    6 rows selected.
    SQL>SY.

  • Item availability for selected items and directly create the delivery

    Hi All,
    For a very big sales order ..lets say having 700 line items ...is there any convenient way to create the delivery for selected items ..e.g. 30-40 line items rather going and selecting the line items then doing the item availability.
    do you have any LSMW format by which we can do the item availability for selected items and directly create the delivery.
    kindly Guide me..
    With Regards
    Azeez.Mohd

    Hi ,
    There is no stand way of doing it . You need to take help of abaper to do this :
    1. Create a t code where if you give sale order number , it displays a report with all the items with a check box near to it as we see in SE16 .
    2. This report could be best in ALV form where users can do "ctr+f" and search only the required materials then select those lines and press a button on the top of report .
    3. Once the button is pressed , program will run vL01n ( create delv in backgrnd) in a BDC form . At time of delev creating , the bdc program in backgrnd uses only those items which were selected by user and not the other items .
    4. Program will create a delv using a BDC in background and return the delv number for user to view tht.
    U can also try using FM : RV_DELIVERY_CREATE to create delv in backgrnd after user selection if BDC is getting tricky.
    Hopefully ,this shuld work and will be a easy process for the customers.
    Let us know the outcome .. .
    B O L ..
    Hope this Helps !!!

  • In perfdatasource querying for global snapshot failed with error 'the size limit for this '

    I received  scom alerts from two win 2k8 r2 servers , hosting exchange 2010 mailbox roles , the alerts came almost in same time from both servers ,
    can I ignore those alerts
    or can someone give a me a clue how can I troubleshoot those alert , please any help would be appreciated
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this '
    from Ops-mgmt logs 
    Log Name:      Operations Manager
    Source:        Health Service Modules
    Date:          
    Event ID:      10104
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:       server 1
    Description:
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this ' 
    One or more workflows were affected by this.  
    Workflow name: Microsoft.Windows.Server.2008.OperatingSystem.PercentMemoryUsed.Collection 
    Instance name: Microsoft Windows Server 2008 R2 Enterprise  
    Log Name:      Operations Manager
    Source:        Health Service Modules
    Date:          
    Event ID:      10104
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:       server 1
    Description:
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this ' 
    One or more workflows were affected by this.  
    Workflow name: Microsoft.Windows.Server.2008.LogicalDisk.PercentIdle.Collection 
    Instance name:  " edb file path "
    Log Name:      Operations Manager
    Source:        Health Service Modules
    Date:          
    Event ID:      10104
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:       server 2 
    Description:
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this ' 
    One or more workflows were affected by this.  
    Workflow name: Microsoft.Windows.Server.2008.NetworkAdapter.CurrentBandwidth.Collection 
    Log Name:      Operations Manager
    Source:        Health Service Modules
    Date:          
    Event ID:      10104
    Task Category: None
    Level:         Error
    Keywords:      Classic
    User:          N/A
    Computer:   server 2   
    Description:
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this ' 
    One or more workflows were affected by this.  
    Workflow name: Microsoft.ForefrontProtection.FPE.Server.PerformanceCollection.RealtimeScanMessageRate

    Hi Blake , 
    Thanks for your reply , I appreciate your help  ,
    I didn't put the alert from scom console because they were same as the events ( same source )
    Health Service Modules, I didn't want to spam
    more :-)
    also the two servers encountered the issue were mailbox servers and part of same DAG , it worth mention the alert were resolved
    by Exchange 2010 Correlation Engine service 
    http://blogs.technet.com/b/kevinholman/archive/2010/10/15/clustering-the-exchange-2010-correlation-engine-service.aspx
    http://support.microsoft.com/kb/2592561
    also the Opsmgmt logs are full of waring and error event like 2023 , 21402 ,  21403 , 1207 !!
    Log Name:      Operations Manager
    Source:        HealthService
    Date:          
    Event ID:      2023
    Task Category: Health Service
    Level:         Warning
    Keywords:      Classic
    User:          N/A
    Computer:      server 1
    Description:
    The health service has removed some items from the send queue for management group "SCOM" since it exceeded the maximum allowed size of 15 megabytes.
    1- alert from console >>
    In PerfDataSource, querying for Global Snapshot failed with error 'The size limit for this '
    One or more workflows were affected by this.
    Workflow name: Microsoft.Windows.Server.2008.OperatingSystem.PercentMemoryUsed.Collection
    Instance name: Microsoft Windows Server 2008 R2 Enterprise 
    EventSourceName: Health Service Modules

  • On Itunes for Windows 7, when I click the check mark box, the song is quickly deleted and sent to the recycle box. How do I go back to when I click on the check mark box, the checkmark is either turned on or off?

    On Itunes for Windows 7, when I click the check mark box, the song is quickly deleted and sent to the recycle box. How do I go back to when I click on the check mark box, the checkmark is either turned on or off?

    Thanks for replying, but I tried that earlier and had that did not work. After your reply I did it again, shutdown itunes and rebooted system. I thought since it didn't do that earlier that might work but same results it deleted file from Itunes but no second questions to move to recycle bin.

  • Error while executing a sql query for select

    HI All,
    ORA-01652: unable to extend temp segment by 128 in tablespace PSTEMP i'm getting this error while i'm executing the sql query for selecting the data.

    I am having 44GB of temp space, while executing the below query my temp space is getting full, Expert please let us know how the issue can be resolved..
    1. I dont want to increase the temp space
    2. I need to tune the query, please provide your recomendations.
    insert /*+APPEND*/ into CST_DSA.HIERARCHY_MISMATCHES
    (REPORT_NUM,REPORT_TYPE,REPORT_DESC,GAP,CARRIED_ITEMS,CARRIED_ITEM_TYPE,NO_OF_ROUTE_OF_CARRIED_ITEM,CARRIED_ITEM_ROUTE_NO,CARRIER_ITEMS,CARRIER_ITEM_TYPE,CARRIED_ITEM_PROTECTION_TYPE,SOURCE_SYSTEM)
    select
    REPORTNUMBER,REPORTTYPE,REPORTDESCRIPTION ,NULL,
    carried_items,carried_item_type,no_of_route_of_carried_item,carried_item_route_no,carrier_items,
    carrier_item_type,carried_item_protection_type,'PACS'
    from
    (select distinct
    c.REPORTNUMBER,c.REPORTTYPE,c.REPORTDESCRIPTION ,NULL,
    a.carried_items,a.carried_item_type,a.no_of_route_of_carried_item,a.carried_item_route_no,a.carrier_items,
    a.carrier_item_type,a.carried_item_protection_type,'PACS'
    from CST_ASIR.HIERARCHY_asir a,CST_DSA.M_PB_CIRCUIT_ROUTING b ,CST_DSA.REPORT_METADATA c
    where a.carrier_item_type in('Connection') and a.carried_item_type in('Service')
    AND a.carrier_items=b.mux
    and c.REPORTNUMBER=(case
    when a.carrier_item_type in ('ServicePackage','Service','Connection') then 10
    else 20
    end)
    and a.carrier_items not in (select carried_items from CST_ASIR.HIERARCHY_asir where carried_item_type in('Connection') ))A
    where not exists
    (select *
    from CST_DSA.HIERARCHY_MISMATCHES B where
    A.REPORTNUMBER=B.REPORT_NUM and
    A.REPORTTYPE=B.REPORT_TYPE and
    A.REPORTDESCRIPTION=B.REPORT_DESC and
    A.CARRIED_ITEMS=B.CARRIED_ITEMS and
    A.CARRIED_ITEM_TYPE=B.CARRIED_ITEM_TYPE and
    A.NO_OF_ROUTE_OF_CARRIED_ITEM=B.NO_OF_ROUTE_OF_CARRIED_ITEM and
    A.CARRIED_ITEM_ROUTE_NO=B.CARRIED_ITEM_ROUTE_NO and
    A.CARRIER_ITEMS=B.CARRIER_ITEMS and
    A.CARRIER_ITEM_TYPE=B.CARRIER_ITEM_TYPE and
    A.CARRIED_ITEM_PROTECTION_TYPE=B.CARRIED_ITEM_PROTECTION_TYPE
    AND B.SOURCE_SYSTEM='PACS'
    Explain Plan
    ==========
    Plan
    INSERT STATEMENT ALL_ROWSCost: 129 Bytes: 1,103 Cardinality: 1                                                        
         20 LOAD AS SELECT CST_DSA.HIERARCHY_MISMATCHES                                                   
              19 PX COORDINATOR                                              
                   18 PX SEND QC (RANDOM) PARALLEL_TO_SERIAL SYS.:TQ10002 :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                         
                        17 NESTED LOOPS PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,103 Cardinality: 1                                    
                             15 HASH JOIN RIGHT ANTI NA PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 129 Bytes: 1,098 Cardinality: 1                               
                                  4 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 63 Bytes: 359,283 Cardinality: 15,621                          
                                       3 PX SEND BROADCAST PARALLEL_TO_PARALLEL SYS.:TQ10001 :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                     
                                            2 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621                
                                                 1 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1001Cost: 63 Bytes: 359,283 Cardinality: 15,621           
                                  14 NESTED LOOPS ANTI PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 40,256,600 Cardinality: 37,448                          
                                       11 HASH JOIN PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 65 Bytes: 6,366,160 Cardinality: 37,448                     
                                            8 BUFFER SORT PARALLEL_COMBINED_WITH_CHILD :Q1002               
                                                 7 PX RECEIVE PARALLEL_COMBINED_WITH_PARENT :Q1002Cost: 1 Bytes: 214 Cardinality: 2           
                                                      6 PX SEND BROADCAST PARALLEL_FROM_SERIAL SYS.:TQ10000 Cost: 1 Bytes: 214 Cardinality: 2      
                                                           5 INDEX FULL SCAN INDEX CST_DSA.IDX$$_06EF0005 Cost: 1 Bytes: 214 Cardinality: 2
                                            10 PX BLOCK ITERATOR PARALLEL_COMBINED_WITH_CHILD :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448                
                                                 9 MAT_VIEW ACCESS FULL MAT_VIEW PARALLEL_COMBINED_WITH_PARENT CST_ASIR.HIERARCHY :Q1002Cost: 63 Bytes: 2,359,224 Cardinality: 37,448           
                                       13 TABLE ACCESS BY INDEX ROWID TABLE PARALLEL_COMBINED_WITH_PARENT CST_DSA.HIERARCHY_MISMATCHES :Q1002Cost: 0 Bytes: 905 Cardinality: 1                     
                                            12 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT SYS.HIERARCHY_MISMATCHES_IDX3 :Q1002Cost: 0 Cardinality: 1                
                             16 INDEX RANGE SCAN INDEX PARALLEL_COMBINED_WITH_PARENT CST_DSA.IDX$$_06EF0001 :Q1002Cost: 1 Bytes: 5 Cardinality: 1

  • I am trying to edit my music list and then sync it to my iPhone 5 so I don't run out of storage space. However, I see the check marks on the iTunes library but am unable to uncheck them? How do I manually edit what will be synced to my phone?

    I am trying to edit my music list and then sync it to my iPhone 5 so I don't run out of storage space. However, I see the check marks on the iTunes library but am unable to uncheck them? How do I manually edit what will be synced to my phone? (the check marks are not bolded, does this mean they are not in my library but only on my phone?)

    You uncheck the music in your iTunes library on your computer and along with sync only checked songs and videos selected under the Summary selection for your iPhone sync preferences with iTunes, only checked songs in your iTunes library will be transferred to your iPhone or remain on your iPhone and the unchecked songs in your iTunes library that are currently on your iPhone will be removed when syncing.
    Or make use of iTunes playlists and choose selected playlists, albums, artists under the Music selection for your iPhone sync preferences with iTunes and select the playlists below that you want transferred to your iPhone.

  • The check marks in the check boxes I added to a Muse Form widget appear blurry.

    The check marks in the check boxes I added to a Muse Form widget appear blurry.  Is there somewhere that I can edit the resolution of these?  Why would the default check marks be at the incorrect resolution?  Could it be something I did when designing the form?
    Thanks!

    The checkmarls are simple images. If you scale up the check mark or look at it in higher magnification, it of course appears blurry.
    You may want to replace the check marks by graphics of your own (perhaps scaleable SVGs)
    Select a check box, open the states panel and see the different states; change the graphics for the desired state by using the "Fill"-command in command strip on top of the application window.

  • Query for select CLOB data field

    Hi All,
    I want to know how to write a SQL query for select CLOB tyoe data from a tablw. when I am trying to use the simple SQL it gives an messageLOB types requires OCI8 mode and currently uasing OCI7 ode.
    Also I am not aware of oci mode?
    If its working for OCI8 mode how I should changer it in to OCI8 mode? (I am using 10g rel 2)
    Thans and regards
    Buddhike

    Hi ,
    i don't want to use loop (sy-tabix) ..
    any particular reason for this ?
    as u cannot automatically generate serial number, u have to go for loop....endloop.
    Thanks
    Karthik

  • What is the highest sowfware that the I pod touch 4g gets?

    Hi, I wanted to know what the highest sowfware that the I pod touch 4g gets. I am on Ios 6.1.6.

    That is the highest. See:
    See the chart below to determine whether you can upgrade your device and what you can upgrade to. If you do not have a Software Update option present on your iDevice, then you are trying to upgrade to iOS 5 or higher. You will have to connect your device to your computer and open iTunes in order to upgrade.
    IPhone, iPod Touch, and iPad iOS Compatibility Chart
         Device                                       iOS Verson
    iPhone 1                                      iOS 3.1.3
    iPhone 3G                                   iOS 4.2.1
    iPhone 3GS                                 iOS 6.1.x
    iPhone 4                                      iOS 7.1.x
    iPhone 4S                                    iOS 7.1.x
    iPhone 5                                      iOS 7.1.x
    iPhone 5c                                     iOS 7.1.x
    iPhone 5s                                     iOS 7.1.x
    iPod Touch 1                               iOS 3.1.3
    iPod Touch 2                               iOS 4.2.1
    iPod Touch 3                               iOS 5.1.1
    iPod Touch 4                               iOS 6.1.x
    iPod Touch 5                               iOS 7.1.x
    iPad 1                                          iOS 5.1.1
    iPad 2                                          iOS 7.1.x
    iPad 3                                          iOS 7.1.x
    iPad 4                                          iOS 7.1.x
    iPad Mini                                      iOS 7.1.x
    iPad Air                                        iOS 7.1.x
    =====================================
    Select the method most appropriate for your situation.
    Upgrading iOS
       1. How to update your iPhone, iPad, or iPod Touch
       2. iPhone Support
       3. iPod Touch Support
       4. iPad Support
         a. Updating Your iOS from iOS 5
              Tap Settings > General > Software Update
         If an update is available there will be an active Update button. If you are current,
         then you will see a gray screen with a message saying your are up to date.
         b. If you are still using iOS 4 — Updating your device to iOS 5 or later.
         c. Resolving update problems
            1. iOS - Unable to update or restore
            2. iOS- Resolving update and restore alert messages

  • The x mark at the right corner of each tab is missing in my ff4.1. I have to right click the tab and then choose the close tab from the drop down? Is this a bug or am i missing something

    I am using FF4.1 and the x mark on the right side of each tab is missing
    Addons i have installed are
    ABP
    Download helper
    Firebug
    Forecast Weather
    Ghostery
    Live Http Headers
    Save as PDF
    Test Pilot

    I think we can eliminate the graphics card as a suspect (and therefore its driver).   I just re-connected my monitor using the internal graphics processor. The Intel 4600.  Not fantastic but actually has better features than the card I had hooked up before. (I might as well stay with this for now. It's an HDMI hook up.)
    The problem is still there.
      This gets more curious all the time.  At this point It would seem that the the likelihood of this being a bug is more or less zero, as myself and one other individual are the only ones reporting it.
    So, I'm thinking it has to be a flawed install. Maybe some line/lines of code are corrupt, if that can happen while still maintaining the rest of the programs integrity.
    Any other thoughts anyone?
    Derek.

  • [svn:fx-4.x] 14772: The check mark in the CheckBox components should never be mirrored, even if the label in the CheckBox is mirrored.

    Revision: 14772
    Revision: 14772
    Author:   [email protected]
    Date:     2010-03-16 07:14:46 -0700 (Tue, 16 Mar 2010)
    Log Message:
    The check mark in the CheckBox components should never be mirrored, even if the label in the CheckBox is mirrored.
    QE notes:
    Doc notes: None
    Bugs: SDK-25817
    Reviewed By: Kevin, Jason
    Tests run: checkintests
    Is noteworthy for integration: No
    Ticket Links:
        http://bugs.adobe.com/jira/browse/SDK-25817
    Modified Paths:
        flex/sdk/branches/4.x/frameworks/projects/spark/src/spark/skins/spark/CheckBoxSkin.mxml
        flex/sdk/branches/4.x/frameworks/projects/sparkskins/src/mx/skins/spark/CheckBoxSkin.mxml

    What are you supposed to cast it to? I might have tried to cast it to something wrong.
    I tried
    TableCellRenderer tcr = table.getDefaultRenderer(Boolean.class);
    ((DefaultTableCellRenderer)tcr).setHorizontalAlignment(SwingConstants.LEFT);and that gave me a ClassCastException. But I might have been trying to cast it to the wrong thing.

  • I am not able to adjust the hight of one page on my site. I try to move the blue mark on the left side and it doesn't move. What should I do ? Thanks

    I am not able to adjust the hight of one page on my site. I try to move the blue mark on the left side and it doesn't move. What should I do ? Thanks

    Hi,
    could you please try to find any blank oject like rectangle/textbox, specially at the lower end of the page. Use Edit -> "Select All" to select everything on the page, it will be easier to locate it.
    Let me know if that works

  • Where is the question mark on the 8600 screen display

    Trying to reset password for wireless and can't find the question mark on the printer keypad. It says it is on the 123 screen but can't find.

    Thank you but still unable to locate. Went to 123? Screen on printer but 3rd row 3rd is a period. The screen is so faint but still ? Does not show up

  • The explimation mark on the iTunes

    I am having trouble with my music,(already downloaded), playing the songs I choose. It only does this on certian songs. The songs that have an explimation mark on the far left side in iTunes on my computer.
    It says the orginal file couldn't be found and would I like for it to be found? When I say yes it doesn't find it. Any help would be greatly appreciated. Thanks.
    bigbear

    Hello, and Welcome to Apple Discussions.
    The exclamation mark means the song is not where iTunes thinks it is. Have you moved the song file on your hard drive? When you say find the file, you have to manually locate it, which for many files is a pain in the $$, but it's the only way basically.
    Hope this helps.

Maybe you are looking for

  • How to retain the same resolution while croping a tiff image using jai api

    Hi all, I have designed a program to crop a tiff image.But after croping the tiff,the resultant file resolution is not the same as the original source file. In the program,the source file Nadeshiko_v1_02.tif has the resolution(X) of 1200 DPI and reso

  • XML Comments in SOAP message - jax-rpc

    I ran across an issue with comments in my soap messages with regards to the serialization. My solution was to strip all the comments inbound and outbound. Are xml comments supported by JAX-RPC? I am currently scouring the internet for more informatio

  • Can't arrange displays

    I attached a Sony Trinitron monitor to the back of my Imac. My Imac and the Sony Monitor mirror each other but I can't seperate them or arrange them. The "arrangement" tab is hidden and when I do a search for monitor, click the arrangement, it says t

  • How to use a check box in smart forms????

    Hi All, Pls let me know how to use check boxes in smartforms.....?? there are check boxe available which are crossed (i.e,, selected checkboxes) in the smartforms.. But i need a checkbox which are not selected.( i.e.., which are not crossed). Its rea

  • Print DataGrid contents (AS3)

    Hello, I am trying to figure out how to print the contents of a DataGrid component in Flash CS3 using ActionScript 3. I am populating a DataGrid with XML and I want the user to be able to print the contents of the grid. The grid contains 4 columns wi