How to find deptno wise sum(sal) using subquery

hi all,
how to find deptno wise sum(sal) using subquery.
can u tell me any one please.
thanks,
regards.

If we are talking standard emp and dept tables ala scott schema then (say); -
select ename, sal, total_dept_salary
from emp,
(select sum(sal) as Total_Dept_Salary,
deptno
from empt
group by
deptno) saldept
where emp.deptno = saldept.deptno
Is that what you were after?? (I would advise against correlated sub-queries on all but the most modest of tables)
There are nicer ways of doing the subquery depending on which version of the db you are on...

Similar Messages

  • How to Find  Credit Check Released Sales Orders /Deliveries?

    Hi Gurus,
       How to Find Credit Check Released Sales Orders /Deliveries for a particular Customer.
    Regrds,
    Binayak
    Message was edited by:  Binayak
            Binayak Ghosh

    Hi,
    You can chech inthe Tcode VKM2 Released SD documents, and VKM4 SD documents.
    reward if useful
    Regards
    syed

  • How to find tcode wise user

    HI all
    HOW to find t_code wise user ?
    and uses wise t_code ?

    Hi ..Sachin
    If u need to find, what all the transcations will be Executed for the particluar user means.. Goto Tcode SUIM.
    In that Expand the TRANSACTIONS TREE.
    And execute the .. EXECUTABLE FOR USER.
    And give the user name..
    Now u may able to know what transactions will be executed for the particular user.
    If any queries Means Reply me.
    Hope it will helps.
    Regards
    Bala..

  • How to find max(time) from table using group by

    how to find max(time) from table using group by
    select var max(time)
              from table
              into (var1, time1)
               where .....
                 group by var.
    it is fetching record which is top in table.
    if u can help?
    regards.

    No this will fetch the maximum time from teh table.
    select var max(time)
    from table xxxx
    into (var1, time1)
    where .....
    group by var.
    Refer this code
    TABLES SBOOK.
    DATA:  COUNT TYPE I, SUM TYPE P DECIMALS 2, AVG TYPE F.
    DATA:  CONNID LIKE SBOOK-CONNID.
    SELECT CONNID COUNT( * ) SUM( LUGGWEIGHT ) AVG( LUGGWEIGHT )
           INTO (CONNID, COUNT, SUM, AVG)
           FROM SBOOK
           WHERE
             CARRID   = 'LH '      AND
             FLDATE   = '19950228'
           GROUP BY CONNID.
      WRITE: / CONNID, COUNT, SUM, AVG.
    ENDSELECT.

  • How to find out which keywords were used to create a smart album?

    Hi,
    I actually have 2 questions;
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Thanks guys,
    Raphael
    <Edited by Host>

    b) With annoying regularity when I try to get to this forum and choose Aperture, I get the following message - in pink, no less: It appears you're not allowed to view what you requested. You might contact your administrator if you think this is a mistake.
    Any clues?
    Raphael,
    that message may occur for four reasons at least:
    Most frequently, when you are using an outdated link to a post that no longer exists, for example from an email notofication. Sometimes our community host will remove posts, that are in violation of the terms of use: see:
    Apple Support Communities Terms of Use
    Or you are using the edit button or a bookmark to an "Edit" window, after the fifteen minutes allowed for editing are up.
    Or you want to view a page in a restricted section of the ASC - soem perta are only open for members of level 6 or higher.
    Or it is one  of the unexplained problems with the forum software right now.
    a) Short of scrolling down my very long list of password on the HUD - is there an elegant way to do it - How to find out which passwords were used to create an existing smart album? It's a recurring challenge for me.\ 'cause I like using smart albums, but once in a while need to check or chane the passwords.
    I really like Kirby's suggestion with the IPTC rule Keyword is. This is very useful for smart albums global to the library.
    Frequently a different approach helps for my smart albums. Many of my smart albums are local to projects or folders.  In this case the smart HUD will only show those keywords that have been used for the images in the selection. So if I only have tagged the images with the keywords "birds" and "slideshow", the smart settings HUD will only show these two keywords and the list is very short.
    My Keywords HUD, is organized hierarchically; this way I can collapse large sections at once, and it is easier to focus on the keywords needed for a specific task.
    I use the search field in HUD a lot, to filter the set of keywords shown.

  • How to find out names of reports using a particular view

    hi guys,
    i am newbie here, i jsut want to know how to find out which reports are using a particular view
    many thanks in advance for your help

    If you go to the Properties for the Folder in Discoverer Administrator, there is a Dependents tab that should list any workbooks using the folder. This only works for workbooks saved to the database, so won't help with any created using Discoverer Desktop. If you are gathering statistics and have the The Discoverer V5 EUL business area and its workbooks installed, it can tell you about Folders Used as well. It contains information about queries run whether the workbook is saved to the database or to the file system, but wouldn't contain inforamation about workbooks that had been created but not run.

  • How to find out if I am using a 32 bits or 64 bits version of JRE?

    How to find out if I am using a 32 bits or 64 bits version of JRE?
    If I have 2 instances of Java installed in 2 seperate directories, one 32 bits and other 64 bits on Linux. How do I identify which directory holds which version?
    Is there any command that can output this info?
    Regards,
    Billamama

    With a Sun JDK or JRE, you can use java -version:
    $ java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) Server VM (build 1.6.0-b105, mixed mode)
    ... switch to the 64-bit JDK ...
    $ java -version
    java version "1.6.0"
    Java(TM) SE Runtime Environment (build 1.6.0-b105)
    Java HotSpot(TM) 64-Bit Server VM (build 1.6.0-b105, mixed mode)
    The last line says "64-Bit."

  • In DBI , how to find out the Source Query used for the Report

    Hi All,
    How to find out the Source Query used to display the data in the DBI Reports or Dashboards. We can get it in Apps Front end by Going to Help and Record Histroty. But DBI Runs in Internet Explorer so i dont know how to get the source query ( SELECT Query ) Used.
    In IE we have View --> Source . But that does not help since it gives the HTML Coding and not the SELECT Query used.
    If anyone has ever worked on it...Please help me in finding it.
    Thanks,
    Neeraj Shrivastava

    Hi neeraj,
    You can see the query used to display reports.Follow these steps to get the query.
    1)Login to oracle apps
    2)Select "Daily Business Intelligence Administrator" responsiblity.
    3)Now click on "Enable/Disable Debugging" (Now u enabled debugging)
    4)now open the report which you want to see the query of
    5)In view source it displays query along with the bind varilables.
    Feel free to ping me if you have any doubts
    thanks
    kittu

  • HT1338 Can anyone tell me how to find what OS I'm using on the Mac? Tiger or Leopard? Also, how do I update from 10.6.8 to the latest version?

    Can anyone tell me how to find what OS I'm using on the Mac?
    Tiger or Leopard?
    Also, how do I update from 10.6.8 to the latest version?

    Go to the Apple menu and select "About This Mac". You will get a window similar to this one -
    You current OS X version number will be shown as I've marked.
    OS X 10.4.x is Tiger, 10.5.x is Leopard, 10.6.x is Snow Leopard, 10.7.x is Lion, and 10.8.x is Mountain Lion.
    Whether or not you can go to the latest OS X version depends upon your hardware -
    You will need to purchase the retail set for the OS X version you want; there is no pint in getting and installing any intermediate versions. Once the retail version has been installed, you can update it to the latest release for that version via download updater.

  • How to find the columns and tables used in a stored procedure?

    Hi,
    Can someone suggest how to find the columns and tables used within a stored procedure?
    Thanks
    VBK

    For example:
    SQL> create or replace
      2    procedure p1
      3      is
      4          cnt number;
      5      begin
      6          select count(*) into cnt from emp;
      7  end;
      8  /
    Procedure created.
    SQL> select  referenced_owner,
      2          referenced_name
      3    from  dba_dependencies
      4    where owner = 'SCOTT'
      5      and name = 'P1'
      6      and referenced_type = 'TABLE'
      7  /
    REFERENCED_OWNER               REFERENCED_NAME
    SCOTT                          EMP
    SQL> SY.

  • How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?

    Hi there,
    How to find out which users are using SharePoint Designer to make changes in SharePoint 2010 site?
    Thanks.

    You need to enable auditing on SharePoint server and it will let you know, if someone makes any critical changes for the same.
    Please walk through this informative KB to enable auditing on SharePoint :https://support.office.com/en-za/article/Configure-audit-settings-for-a-site-collection-f5a346d0-ee0f-4412-a5e6-d9b5abaa1012
    Here is one more resource :
    https://support.office.com/en-in/article/View-audit-log-reports-4293e8d5-4e7d-4201-b8ac-c8e63a100131
    Moreover, if you wish to audit such critical changes automatically, you may consider on this comprehensive application (http://www.sharepointauditing.com/) that helps to track every changes on SharePoint into
    real time and provides the captured data at granular level.

  • How to find a perticular t.codse used in last 6 months

    Hi All,
    can anyone let us know how to find a perticular t.codse used in last 6 months.
    Regards!!

    Hi,
    Its all depends on the settings has done for transaction ST03N.
    If it has explicitly set to last 6 months then you can find in the left hand side transaction profile coloumn of ST03N.
    If not you can set it  by the following way:
    ST03N>goto collector and perfomrance DB>monitoring database-->Reorganisation
    Thank you,
    Tilak

  • How to find out internet explorer version ,using a java program?

    How to find out internet explorer version ,using a java program?

    Browser version from java?....you must be referring it from some web application....rite?
    You can read the User-Agent header using request.getUserAgent() or request.getHeader("User-Agent") in your jsp or servlet.
    for more details pls refer:
    http://www.jguru.com/jguru/faq/view.jsp?EID=12253

  • How to find 2 different projects are using which gl accounts and co pa char

    Hi ,
              There are 2 different project id s , now how to find differences between them regarding using of G/L accounts and required characteristics for the COPA module ?
    Thanks & regds
    Ramachandra

    hope you are talking about the value field for COPA.
    Please go to the project profile and find out the settlement profile, and from settlement profile find out the PA transfer structure, and check the PA transfer structure for COPA value filed details.

  • How to find a memory and CPU used by a specific concurrent program ?

    Dear All ,
    How to find a memory and CPU used by a specific concurrent program ?
    Thanks.

    Hi,
    How to find a memory and CPU used by a specific concurrent program ?
    Could you please let us can we get the
    memory used for a specific concurrent request .
    Please refer scripts available at:
    Concurrent Manager and program related scripts
    Queries : Concurrent Managers/Processes
    Thanks &
    Best Regards,

Maybe you are looking for

  • IPhone 4 Problems

    Okay I'm having two problems that go with my everyday life, which started with the newest ios update but I'm not sure if its fix able. Now the first one I'm having is wifi, it can't find it/saying there is no wifi around me...I'm at home or any other

  • Open Purchase order pload

    Can any one provide OPen purchase order upload program using BAPI method.... Thanks & regards. Ramesh T. Moderator Message : Not enough re-search before posting. Thread locked Edited by: Vinod Kumar on Apr 22, 2011 3:41 PM

  • Unable to Access Menu in SFP Layout tab

    Hi, Could someone please help me? In transaction SFP, under the Layout tab, I'm unable to access the Menu (Edit, View, Insert, Layout, Tools, Palletes, Help). Is there any setting which I've missed out? Just in case this information is important, my

  • Could not start the hyperion workspace-web application Error 1067

    Hi, I have installed hyperion from scratch in a distributed environment...everything was working fine.......i.e. shared services, workspace, essbase, sql server, and hfm. I was able to logon and navigate different options in the hyperion products...b

  • Unhandled exception user setting 'preferredsite' is not available

    Hi I only have problems with my Server 2012, Exchange 2010 servers since we created them as Hyper-V 2012R2 generation 2 servers. Now, I get this error in the event vwr. I am running Exchange 2010 SP3 RU4