No group functionality

Since around seven 30 - Oct 1st or so I was unable to use all group functions in any group. 'Old' and those that I just created. I can't send or receive calls or messages in any group. I tried these steps below, and none of them worked. Help?

(1) sign out and back in

(2) change of profile information

(3) update the customer on the later (7.11.0.102)

(4) to uninstall and reinstall Skype

(5) clean uninstall and reinstall of Skype

(6) signature mobile to see if that will fix anything on the end of my PC

Mobile works very well, however my PC version does not. It worked very well in advance and then just suddenly stopped working for groups. Update the client did nothing. However, I can / message of appeal to people individually. I don't understand. I thought it was the linked server, but my friends have not had any problems...

Skype is based on some Windows Services work properly, or something?

I'm under 10 Home Windows (64-bit).

Welp, after scouring the net I found the problem. It turns out that my situation was the same as this post here.

http://community.Skype.com/T5/Windows-desktop-client/re-Skype-connection-problems-MSNP-connection-of...

Tags: Skype

Similar Questions

  • Not a "simple-group function.

    SQL > select max(THREAD#), SEQUENCE #, NAME from v$ archived_log;

    Select max(THREAD#), SEQUENCE #, NAME from v$ archived_log

    *

    ERROR on line 1:

    ORA-00937: not a single group group function

    Often, I face "not a single-group function. I tried with the order by clause, also,

    -Please clarify why this error occurs?

    Hello

    You must use Group by clause in your query when you use the Group feature as count, sum, max in query

    Select max(THREAD#), SEQUENCE #, NAME of Group v$ archived_log by SEQUENCE #, NAME;

    Thank you

    Su.GI

  • Help with error - 934 group function is not allowed here

    Hey there will, I'm having problems with a request and just does not know how to do it without error.

    I'm trying to get all the employee emerging infectious diseases that have less than 2 number max of DID (dependants) in the table.

    It's my current query

    SELECT Employee.LName. ' ' || Employee.Fname as Full_Name, Employee.EID

    The left outer JOIN employee depends on Employee.EID = Dependent.EID

    Having Count (DID)--2 > ((select Max (N) as From (SELECT Employee.EID, Count (DID) As N FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID, Count (DID))) N)

    Order of Employee.Lname, Employee.Fname

    Which gives me an error on column 4, no matter what I do. If I remove the Count (DID) in the group by clause (which I tried it earlier), it gives me a is not an error of the function of single group...

    The most frustrating thing is that

    Select Max (N) as From (SELECT Employee.EID, Count (DID) As N FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID) N

    Works perfectly, but because it's a mission, I have to do in one step (no substeps/views)

    Any help?

    Thank you very much

    Hello

    ac981e5d-D10A-4520-BF42-23a894d04fb7 wrote:

    Ok. I'm taking your code in a view... I get this.

    and there is an orange underscore and a text of the error that says

    Select incoherent list in group by... change the group by clause of e.fname, e.lname, e.eid, count, max

    Which isn't what either the Oracle database would do.  Everything about orange (or any other color) sounds like it is caused by a front-end that could be interacting with Oracle.  In addition, the Oracle error messages always come with a 3-letter-5 code, as ORA-00933.

    under the selection internal (first medium)

    You have deleted the WITH clause.  The parser can recognize the error when it has reached the first left parenthesis.

    Create view AS A10T2

    (

    SELECT e.lname. ' ' || e.fname AS full_name

    e.eid

    (D.) AS this_group_count

    MAX (COUNT (d.)) ON (AS highest_group_count)

    E employee

    LEFT OUTER JOIN dependent d ON e.eid = d.eid

    GROUP BY e.lname, e.fname, e.eid

    )

    SELECT full_name

    eid

    Of aggregate_results

    WHERE this_group_count > = highest_group_count - 2

    ORDER BY full_name

    You need the WITH to define this clause means "AGGREGATE_RESULTS":

    Create view AS A10T2

    WITH aggregate_results AS

    (

    SELECT e.lname. ' ' || e.fname AS full_name

    ...

    Why do you have an ORDER BY clause in a view?   (It is probably not cause of your errors, just make the inefficient view)

    Command line error: column 5: 23

    Error report-

    SQL error: ORA-00933: SQL not correctly completed command

    00933 00000 - "not correctly completed SQL command.

    * Cause:

    * Action:

    This is another indication that some front is getting involved.  Looks like your front-end reports the exact Oracle error message, "0RA-00933" and then builing it's own error code, "00933. 00000 ", on this basis.  ORA-00933 is a reasonable mistake to wait if you omit the line ' WITH the aggregated results AS.  Once again, until I can actually run your code, I can't test it, and I can't run your code until you post CREATE TABLE and INSERT statements for some examples of data, or change the problem to use commonly available tables, such as those in the scott schema.

    and when I try my code

    CREATE VIEW A10T2 AS

    SELECT Employee.LName. ' ' || Employee.Fname as Full_Name, Employee.EID

    The left outer JOIN employee depends on Employee.EID = Dependent.EID

    Seen (Count (DID)) + 2 > (select Max (N) From (SELECT Employee.EID, Count (DID) As "N" FROM Employee Inner Join Dependent On Employee.EID = Dependent.EID group by Employee.EID))

    Order of Employee.Lname, Employee.Fname

    I get

    Command line error: column 2: 8

    Error report-

    SQL error: ORA-00937: not a function of simple-group

    00937 00000 - 'not a single-group function.

    * Cause:

    * Action:

    Then the orange underscore even under my inner ("select employee. EID, Count (DID) as "N" ") says to change the Group of Employee.eid, Count (DID)

    I just don't understand why he tells me to group them by Count (DID)?

    Isn't that what you did in your original post, and I have explained in answer #2?  If you continue to repeat the same mistake, you can expect continue to get the same error.  Given that you have a code, you know causes an error, do you think really that what makes a vision will cause the error to disappear?

    The inner query works fine on its own...

    Right; It's the outer query where you are missing the GROUP BY clause.

  • not a single group function

    Hello


    I have this request with me
    select  
    mst.ENTRY_DATE    ordered_date , mst.FIELD, 
    V.ADDRESS1        Address   , 
    OPN_JOB_DESC      job_number,
    ra.CUSTOMER_NAME    customer_NAME, 
    DECODE ( GROSS_ITEM_REF , NULL , SUBSTR (PRODUCT_ATTR_VAL_DISP , INSTR( PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ) , GROSS_ITEM_REF )      item_number, 
    dECODE (GROSS_ITEM_NAME , NULL,itm.attribute2,GROSS_ITEM_NAME  )        item_description, 
    subdtlest.ITEM_UOM                unit_of_measurement, 
    SUM ( subdtlest.QTY_ISSUE  )            Quantity_Issue,
    sum(nvl (subdtlest.CALC_CEMENT_SK ,subdtlest.CALC_AMOUNT ) )    quantity ,
    mst.DN_DESCRIPTION   Description
    --decode(MST.DESCRIPTION ,NULL ,mst.DN_DESCRIPTION,MST.DESCRIPTION) Description
     from 
       XXNP_OPN_JOBLOG_001          mst , 
       XXNP_OPN_JOBLOG_STAGE_002   dtl , 
       XXNP_OPN_JOBLOG_SLURRY_003  subdtl ,
       XXNP_OPN_JOBLOG_EST_002     subdtlest,
       qp_list_lines_v            line  ,
       QP_LIST_HEADERS_TL          head  ,
       QP_LIST_HEADERS_B           curr,   
       ra_customers ra ,
       AR_ADDRESSES_V v ,
       MTL_SYSTEM_ITEMS itm  
       where   
    dtl.OPN_JOBLOG_001_ID                        = mst.OPN_JOBLOG_001_ID         AND 
    subdtl.OPN_JOBLOG_001_ID                = dtl.OPN_JOBLOG_001_ID          AND
    subdtl.OPN_JOBLOG_006_ID                  = dtl.OPN_JOBLOG_006_ID         and  
    subdtlest.OPN_JOBLOG_001_ID           = subdtl.OPN_JOBLOG_001_ID       AND
    subdtlest.OPN_JOBLOG_006_ID         = subdtl.OPN_JOBLOG_006_ID      AND
    subdtlest.OPN_JOBLOG_007_ID         = subdtl.OPN_JOBLOG_007_ID      AND
    line.LIST_HEADER_ID          =       head.LIST_HEADER_ID                          and  
    curr.LIST_HEADER_ID              =   head.LIST_HEADER_ID                        and  
    substr ( PRODUCT_ATTR_VAL_DISP , 1, instr ( PRODUCT_ATTR_VAL_DISP ,'.' )-1 )  = subdtlest.ITEM_NUMBER
    and   itm.SEGMENT3 = substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ) 
    and   mst.CONTRACT                       =  head.name   
    and   RA.CUSTOMER_ID = v.CUSTOMER_ID
    and   ra.customer_id = mst.customer_id
    and   V.ADDRESS1 =  mst.CONTRACT      
    and mst.OPN_JOB_DESC='K/D/UP24/UN006/KOP/PL/0112/1'
    and itm.ORGANIZATION_ID  =103
    and itm.INVENTORY_ITEM_STATUS_CODE = 'Active'
    group by 
    mst.ENTRY_DATE ,  
    V.ADDRESS1     , 
    OPN_JOB_DESC   ,mst.FIELD,
    ra.CUSTOMER_NAME , 
    substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ), 
    itm.ATTRIBUTE2        , 
    subdtlest.ITEM_UOM ,
    mst.DN_DESCRIPTION  ,GROSS_ITEM_REF ,GROSS_ITEM_NAME
    order by  substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  )   Asc
    
    i require  a field called balance which is sum of Quantity_issue and Quantity fields
    i tried this
    
    select  
    mst.ENTRY_DATE    ordered_date , mst.FIELD, 
    V.ADDRESS1        Address   , 
    OPN_JOB_DESC      job_number,
    ra.CUSTOMER_NAME    customer_NAME, 
    DECODE ( GROSS_ITEM_REF , NULL , SUBSTR (PRODUCT_ATTR_VAL_DISP , INSTR( PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ) , GROSS_ITEM_REF )      item_number, 
    dECODE (GROSS_ITEM_NAME , NULL,itm.attribute2,GROSS_ITEM_NAME  )        item_description, 
    subdtlest.ITEM_UOM                unit_of_measurement, 
    SUM ( subdtlest.QTY_ISSUE  )            Quantity_Issue,
    sum(nvl (subdtlest.CALC_CEMENT_SK ,subdtlest.CALC_AMOUNT ) )    quantity ,
    sum(sum(nvl (subdtlest.CALC_CEMENT_SK ,subdtlest.CALC_AMOUNT ) ) + SUM ( subdtlest.QTY_ISSUE  )  )balance,
    mst.DN_DESCRIPTION   Description
    --decode(MST.DESCRIPTION ,NULL ,mst.DN_DESCRIPTION,MST.DESCRIPTION) Description
     from 
       XXNP_OPN_JOBLOG_001          mst , 
       XXNP_OPN_JOBLOG_STAGE_002   dtl , 
       XXNP_OPN_JOBLOG_SLURRY_003  subdtl ,
       XXNP_OPN_JOBLOG_EST_002     subdtlest,
       qp_list_lines_v            line  ,
       QP_LIST_HEADERS_TL          head  ,
       QP_LIST_HEADERS_B           curr,   
       ra_customers ra ,
       AR_ADDRESSES_V v ,
       MTL_SYSTEM_ITEMS itm  
       where   
    dtl.OPN_JOBLOG_001_ID                        = mst.OPN_JOBLOG_001_ID         AND 
    subdtl.OPN_JOBLOG_001_ID                = dtl.OPN_JOBLOG_001_ID          AND
    subdtl.OPN_JOBLOG_006_ID                  = dtl.OPN_JOBLOG_006_ID         and  
    subdtlest.OPN_JOBLOG_001_ID           = subdtl.OPN_JOBLOG_001_ID       AND
    subdtlest.OPN_JOBLOG_006_ID         = subdtl.OPN_JOBLOG_006_ID      AND
    subdtlest.OPN_JOBLOG_007_ID         = subdtl.OPN_JOBLOG_007_ID      AND
    line.LIST_HEADER_ID          =       head.LIST_HEADER_ID                          and  
    curr.LIST_HEADER_ID              =   head.LIST_HEADER_ID                        and  
    substr ( PRODUCT_ATTR_VAL_DISP , 1, instr ( PRODUCT_ATTR_VAL_DISP ,'.' )-1 )  = subdtlest.ITEM_NUMBER
    and   itm.SEGMENT3 = substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ) 
    and   mst.CONTRACT                       =  head.name   
    and   RA.CUSTOMER_ID = v.CUSTOMER_ID
    and   ra.customer_id = mst.customer_id
    and   V.ADDRESS1 =  mst.CONTRACT      
    --and   OPN_JOB_DESC = :P_JOB_NUMBER
    and itm.ORGANIZATION_ID  =103
    and itm.INVENTORY_ITEM_STATUS_CODE = 'Active'
    and mst.OPN_JOB_DESC='K/D/UP24/UN006/KOP/PL/0112/1'
    group by 
    mst.ENTRY_DATE ,  
    V.ADDRESS1     , 
    OPN_JOB_DESC   ,mst.FIELD,
    ra.CUSTOMER_NAME , 
    substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  ), 
    itm.ATTRIBUTE2        , 
    subdtlest.ITEM_UOM ,
    subdtlest.CALC_CEMENT_SK ,subdtlest.CALC_AMOUNT, subdtlest.QTY_ISSUE ,
    mst.DN_DESCRIPTION  ,GROSS_ITEM_REF ,GROSS_ITEM_NAME
    order by  substr ( PRODUCT_ATTR_VAL_DISP , INSTR(PRODUCT_ATTR_VAL_DISP, '.', -1, 1) + 1  )   Asc
    
    but i get the cursor pointing to mst.entry_date and the message "not a single group function"
    
    kindly guide me
    thanking in advance
  • Group functions

    Hello

    Is it possible to aggregate group functions based on a field in responses, my query is below:

    SELECT Absence_Days,
    Absence_Reason,
    Absence_Type,
    Employee_name,
    End_date,
    First name,
    Last_name,
    Person_Id,
    Start_date,
    DEPARTMENT,
    DIVISION,
    INTERNAL_LOCATION,
    CASE
    WHERE LAST_NAME = 'Gordon '.
    THEN COUNT (person_id) * COUNT (Person_Id) * SUM (Absence_Days)
    0 OTHERWISE
    END
    FROM EMP
    WHERE LAST_NAME = 'Gordon '.
    GROUP OF ABSENCE_DAYS, ABSENCE_REASON, ABSENCE_TYPE, EMPLOYEE_NAME, END_DATE, FIRST_NAME, LAST_NAME, PERSON_ID, START_DATE, DEPARTMENT, DIVISION, INTERNAL_LOCATION

    Count (person_id) * COUNT (Person_Id) * SUM (Absence_Days) returns a value by each line and aggregate in the column of fx. I want to this group by person_id, is this possible?

    Thank you

    Hello

    Try this in Fx

    SUM (Absence_Days by person_id)

    Thank you
    Saichand.v

  • Analytical and group functions of

    Oracle 11g Release 2 Server

    SQL, SQLPLUS not

    I need to 'break' when a column value changes and insert a line with only a dash.

    CREATE TABLE tab
    (   id            number
      , part_num      number
      , part_type_id  number
      , part_type_txt varchar2(50)
      , CONSTRAINT tab_pk PRIMARY KEY(part_num,part_type_id)
    )
    /
    
    insert into tab values(1,10,100,'hose') ;
    insert into tab values(1,10,110,'hose clamp') ;
    insert into tab values(1,20,200,'plastic value') ;
    insert into tab values(1,20,210,'brass value') ;
    insert into tab values(1,30,300,'headlamp') ;
    insert into tab values(1,30,310,'lamp misc') ;
    commit ;
    
    select part_num,part_type_id,part_type_txt, count(part_num) CNT
    from   tab
    where  id = 1
    group by part_num,part_type_id,part_type_txt
    order by part_num,part_type_id ;
    
      PART_NUM PART_TYPE_ID PART_TYPE_TXT       CNT
    ---------- ------------ ------------------- ----------
            10          100 hose                         1
            10          110 hose clamp                   1
            20          200 plastic value                1
            20          210 brass value                  1
            30          300 headlamp                     1
            30          310 lamp misc                    1
    

    My query:

    WITH   data
    AS
    (
       select   case when nvl( lag( part_num ) over( order by rownum ), ' ' ) != part_num
                     then part_num
                end part_num
             ,  part_type_id, part_type_txt, count(part_num) CNT
       from
                tab
       where    id = 1 
       group by    case when nvl( lag( part_num ) over( order by rownum ), ' ' ) != part_num
                        then part_num
                   end 
                 , part_type_id
                 , part_type_txt
       order by part_num,part_type_id 
    )
    SELECT rownum, d.part_num,d.part_type_id, d.part_type_txt
    FROM   data   d ;
    
    ERROR at line 11:
    ORA-30483: window  functions are not allowed here
    
    
    

    I guess that analytical functions are not allowed in a group by clause.

    Output desired, he had to 'break' on when PART_NUM changes and insertion of a line with a dash (-):

      PART_NUM PART_TYPE_ID PART_TYPE_TXT       CNT
    ---------- ------------ ------------------- ----------
            10          100 hose                         1
            10          110 hose clamp                   1
            -
            20          200 plastic value                1
            20          210 brass value                  1
            -
            30          300 headlamp                     1
            30          310 lamp misc                    1
    

    Any help appreciated.

    Hello

    I see: XYZ123 is linked only to a part_type_id, 7777, so you do not want any output to XYZ123.

    Similarly, XYZ456 is only linked to a part_type_id, 8888, so you do not want XYZ456.

    One thing you can do is to start with the query in response to #4 above.  The results of this query, you can count part_type_ids h: different lots, each part_num is bound to and then only display the part_nums who have more than 1 part_type_id.  For example:

    WITH got_aggregates AS

    (

    SELECT THE CHECK BOX

    WHEN you GROUP (part_type_id) = 0

    THEN TO_CHAR (part_num)

    ELSE '-'

    END                               AS txt

    part_type_id, part_type_txt

    CASE

    WHEN you GROUP (part_type_id) = 0

    THEN COUNT (part_num)

    END                               AS cnt

    part_num,

    COUNT (DISTINCT part_type_id)

    COURSES (PARTITION BY part_num) AS part_type_id_cnt

    TAB

    ID WHERE = 1

    GROUP BY part_num, ROLLUP (part_type_id, part_type_txt))

    )

    SELECT txt, part_type_id, part_type_txt, cnt

    OF got_aggregates

    WHERE part_type_id_cnt > 1

    ORDER BY part_num, part_type_id

    ;

    Note that the subquery got_aggregates is almost identical to the response query #4.  The only differences are that the subquery is not an ORDERBY clause (ORDER BY is almost always useless to subqueries) and includes two additional columns, which will be needed in the WHERE and ORDER BY the main query clauses.

  • Group function

    Function group can be nested?

    Hello

    MU peleipua wrote:
    Function group can be nested?

    One of the aggregate functions can be nested inside of each other. The GROUP BY clause will be aplly to domestic.
    For example:

    SELECT    AVG (SUM (sal))    AS avg_dept_sal
    FROM      scott.emp
    GROUP BY  deptno
    ;
    

    First of all, the SUM is calculated for each Department, then the average of these numbers is taken.
    The result set of a query with a nested aggregate functions always contains 1 row.

    AVG_DEPT_SAL
    ------------
            9675
    

    To understand what is happening, you may find it useful to run a similar query without the external function:

    SELECT       deptno
    ,       SUM (sal)     AS dept_sal
    FROM       scott.emp
    GROUP BY  deptno
    ;
    

    Output:

    .   DEPTNO   DEPT_SAL
    ---------- ----------
            30       9400
            20      10875
            10       8750
    

    You cannot nest deeper than that of aggregation functions.

  • Need help with Group functions

    I'm a total novice with SQL, so please forgive me if the answer to my question seems to be too obvious
    I work with diagrams of the sample (in particular with the employees table):

    DESC employees;
    result

    What I have to do is select all the managers, including the number of subordinates is higher than the average number of subordinates of managers who work in the same Department. What I've done so far is as follows:

    SELECT mgr.employee_id manager_id, Director of mgr.last_name, mgr.department_id, COUNT (emp.employee_id)
    Employees emp employees JOIN Bishop
    ON emp.manager_id = mgr.employee_id
    GROUP OF mgr.employee_id, mgr.last_name, mgr.department_id
    ORDER BY mgr.department_id;
    result

    As you can see, I'm almost done. Now, I need only to calculate the average of the result of the COUNT function for each Department. But I'm totally stuck at this point.
    All advice?

    Hello

    Welcome to the forum!

    user12107811 wrote:
    I'm a total novice with SQL, so please forgive me if the answer to my question seems to be too obvious

    Just the opposite! Looks like a very difficult mission.

    I work with diagrams of the sample (in particular with the employees table):

    DESC employees;
    result

    What I have to do is select all the managers, including the number of subordinates is higher than the average number of subordinates of managers who work in the same Department. What I've done so far is as follows:

    SELECT mgr.employee_id manager_id, Director of mgr.last_name, mgr.department_id, COUNT (emp.employee_id)
    Employees emp employees JOIN Bishop
    ON emp.manager_id = mgr.employee_id
    GROUP OF mgr.employee_id, mgr.last_name, mgr.department_id
    ORDER BY mgr.department_id;
    result

    As you can see, I'm almost done. Now, I need only to calculate the average of the result of the COUNT function for each Department. But I'm totally stuck at this point.
    All advice?

    Yes, you're almost done. You just need to add one more condition. You have to calculate the average value of total_cnt (the COUNT (*) you already do) of a Department and compare that to total_cnt.

    There are several ways to do this, including
    a scalar subquery (in a HAVING clause)
    (b) make a result set with one line per Department, containing the average_cnt and reach than your current result set
    (c) analytical functions. Analytical functions are calculated after the GROUP BY clause is applied and aggregate functions are calculated, it is legitimate to say "AVG (COUNT (*)) MORE (...)").

    If thinking (c) is the simplest. It involves the use of a query of Tahina, but (a) and (b) also require subqueries.

    This sounds like homework, so I'll do it for you.
    Instead, here is a very similar problem with the hr.employees table.
    Let's say that we are interested in total wages given each type of work in each Department.

    SELECT        department_id
    ,        job_id
    ,        SUM (salary)     AS sum_sal
    FROM        hr.employees
    GROUP BY   department_id
    ,             job_id
    ORDER BY   department_id
    ,             job_id
    ;
    

    Results:

    DEPARTMENT_ID JOB_ID        SUM_SAL
    ------------- ---------- ----------
               10 AD_ASST          4400
               20 MK_MAN          13000
               20 MK_REP           6000
               30 PU_CLERK        13900
               30 PU_MAN          11000
               40 HR_REP           6500
               50 SH_CLERK        64300
               50 ST_CLERK        55700
               50 ST_MAN          36400
               60 IT_PROG         28800
               70 PR_REP          10000
               80 SA_MAN          61000
               80 SA_REP         243500
               90 AD_PRES         24000
               90 AD_VP           34000
              100 FI_ACCOUNT      39600
              100 FI_MGR          12000
              110 AC_ACCOUNT       8300
              110 AC_MGR          12000
                  SA_REP           7000
    

    Now suppose we want to find out which of these sum_sals is higher than the average sum_sal of his Department.
    For example, in detriment 110 (near the end OIF the list) there two types of work (AC_ACCOUND and AC_MGR) that have sum_sals of 8300 and 12000. The average of these two numbers is 10150, so we selected AC_MGR (because its sum_sal, 12000, is superior to 10150, and we do not want to include AC_ACCOUNT, because its sum_sal, 8300, is less than or equal to the average of the Department.
    In departments where there is only one job type (for example, Department 70, or null "Department" at the end of the list above) the only sum_sal will be the average; and because the sum_sal is not greater than the average, we want to exclude this line.

    Let's start with the calculation of the avg_sum_sal using the analytical function AVG:

    SELECT        department_id
    ,        job_id
    ,        SUM (salary)                              AS sum_sal
    ,        AVG (SUM (salary)) OVER (PARTITION BY department_id)     AS avg_sum_sal
    FROM        hr.employees
    GROUP BY   department_id
    ,             job_id
    ORDER BY   department_id
    ,             job_id
    ;
    

    Output:

    DEPARTMENT_ID JOB_ID        SUM_SAL AVG_SUM_SAL
    ------------- ---------- ---------- -----------
               10 AD_ASST          4400        4400
               20 MK_MAN          13000        9500
               20 MK_REP           6000        9500
               30 PU_CLERK        13900       12450
               30 PU_MAN          11000       12450
               40 HR_REP           6500        6500
               50 SH_CLERK        64300  52133.3333
               50 ST_CLERK        55700  52133.3333
               50 ST_MAN          36400  52133.3333
               60 IT_PROG         28800       28800
               70 PR_REP          10000       10000
               80 SA_MAN          61000      152250
               80 SA_REP         243500      152250
               90 AD_PRES         24000       29000
               90 AD_VP           34000       29000
              100 FI_ACCOUNT      39600       25800
              100 FI_MGR          12000       25800
              110 AC_ACCOUNT       8300       10150
              110 AC_MGR          12000       10150
                  SA_REP           7000        7000
    

    Now all we have to do is to compare the sum_sal and avg_sum_sal columns.
    Given that the analytic functions are calculated after the WHERE clause is applied, we cannot use avg_sum_sal in the WHERE clause of the query, even where it has been calculated. But we can do that in a subquery; Then, we can use avg_sum_sal in any way that we love in the Super-requete:

    WITH     got_avg_sum_sal       AS
    (
         SELECT        department_id
         ,        job_id
         ,        SUM (salary)                              AS sum_sal
         ,        AVG (SUM (salary)) OVER (PARTITION BY department_id)     AS avg_sum_sal
         FROM        hr.employees
         GROUP BY   department_id
         ,             job_id
    )
    SELECT        department_id
    ,        job_id
    ,        sum_sal
    FROM        got_avg_sum_sal
    WHERE        sum_sal     > avg_sum_sal
    ORDER BY   department_id
    ,             job_id
    ;
    

    Results:

    DEPARTMENT_ID JOB_ID        SUM_SAL
    ------------- ---------- ----------
               20 MK_MAN          13000
               30 PU_CLERK        13900
               50 SH_CLERK        64300
               50 ST_CLERK        55700
               80 SA_REP         243500
               90 AD_VP           34000
              100 FI_ACCOUNT      39600
              110 AC_MGR          12000
    
  • The local users and 'Add Member to group' groups function displays the password in clear text

    Hello

    I saw something strange that happens when you add the connected locally to the domain user to a local security group via lusrmgr.msc. This seems to be repeated in our Organization, and I was wondering if it's something to do with our generation, or if it is more widespread? After you have selected the locally connected user (domain) to be added to a local security group, but before confirming with OK / apply, the user name appears in the ACL in the format:

    Domain\username (password@fulldomain)

    The password appears when the user name should be, which is probably just a minor bug where an incorrect value is selected on the screen, but the fact that it is displayed in plain text rather than a hash of password is a little more disconcerting. There seems to be some caveats: it affects only the users in the domain (local users are displayed differently); It is not affected by the local administrator rights (although /are/ to add the user to the local administrator rights); It doesn't affect that the user logged on locally (I can't reproduce as a runas user).

    The steps to reproduce this are:
    (1) start | Run | lusrmgr.msc
    (2) go to the groups. [Any group] | Right-click | Add to group
    3) click on add
    (4) enter the username of the user locally. Ok

    Anyone else see this behavior?

    See you soon,.

    Dines keV

    Hello

    The question you posted would be better suited to the TechNet community. Please visit the link below to find a community that will provide the support you want.

    http://social.technet.Microsoft.com/forums/en-us/category/w7itpro

    Hope this information is useful.

  • ORA-00937: not a single group group function

    Hello world

    I got an error above with followingcode... Please help me

    SELECT

    ROW_NUMBER() OVER (PARTITION OF LANEDIRECTION, ORDER BY TIMEID COSIT) AS RN, DAYASNUMBER,.

    (to_date (timeid, 'YYYYMMDD hh24miss')) as cte.

    drive ((to_date (timeid, 'AAAAMMJJ hh24miss')), 1) on next_start_date (partition by order lanedirection (to_date (timeid, 'YYYYMMDD hh24miss')));

    VOLUME, (LEAD

    volume)

    DURING)

    PARTITION BY dayasnumber, link_id

    ORDER BY

    DayAsNumber, link_id, (to_date (timeid, 'YYYYMMDD hh24miss'))) as next_volume,

    Lag)

    volume)

    DURING)

    PARTITION BY dayasnumber, link_id

    ORDER BY

    DayAsNumber, link_id, (to_date (timeid, 'YYYYMMDD hh24miss'))) as prior_volume,

    COSIT,

    LANEDIRECTION, AVGSPEED,

    LINK_ID,

    TO_CHAR ((to_date (timeid, 'YYYYMMDD hh24miss')), "hh24") that the hours,

    12 AS EXPECTED_COUNT,

    COUNT (TO_NUMBER (SUBSTR (TO_CHAR (timeid), 9, 2))) AS ACTUAL_COUNT,

    CASE

    WHEN COUNTY (TO_NUMBER (SUBSTR (TO_CHAR (timeid), 9, 2))) = 12

    THEN

    « N »

    WHEN COUNTY (TO_NUMBER (SUBSTR (TO_CHAR (timeid), 9, 2))) = 11

    THEN

    'I '.

    WHEN COUNTY (TO_NUMBER (SUBSTR (TO_CHAR (timeid), 9, 2))) < 6

    THEN

    « C »

    ON THE OTHER

    ' O '

    END

    AS PATCHED

    FROM (select DAYASNUMBER,

    TimeID, COSIT,

    LANEDIRECTION, VOLUME, AVGSPEED,

    LINK_ID

    OF C2_DATA_MIN where <>volume 0

    DAYASNUMBER GROUP,

    COSIT,

    TimeID,

    LANEDIRECTION, VOLUME, AVGSPEED,

    LINK_ID);

    Thanks in advance

    You have an aggregate count that needs a group by clause, you may need to use over().

    Also, what type of data is timeid? If it is a DATE, you should not use to_date on it. If it is of type VARCHAR,

    You should not use to_char on it. Do you both, so let's not.

    If it's a DATE, never use to_char with a format mask.

  • some group functions

    Hi all, I have some data here want to get a desired output like below. I don't know how I could rollup charge_id sales/GST on the same line, respectively.

    WITH T AS (
    SELECT 'SALES' AS TYPE,    41.7  AS AMOUNT,      51343382 AS CHARGE_ID FROM DUAL UNION
    SELECT 'GST' AS TYPE,    4.7  AS AMOUNT,      51343382 AS CHARGE_ID FROM DUAL UNION
    SELECT 'SALES' AS TYPE,    2793.7  AS AMOUNT,      51343383 AS CHARGE_ID FROM DUAL UNION
    SELECT 'GST' AS TYPE,   279.37  AS AMOUNT,      51343383 AS CHARGE_ID FROM DUAL UNION
    SELECT 'GST' AS TYPE,   279.37  AS AMOUNT,      51343384 AS CHARGE_ID FROM DUAL UNION            
    SELECT 'GST' AS TYPE,   -250  AS AMOUNT,      51343384 AS CHARGE_ID FROM DUAL UNION
    SELECT 'SALES' AS TYPE,   2793.70  AS AMOUNT,      51343384 AS CHARGE_ID FROM DUAL UNION
    SELECT 'RETURN' AS TYPE,   -2500  AS AMOUNT,      51343384 AS CHARGE_ID FROM DUAL UNION
    SELECT 'GST' AS TYPE,   69.80  AS AMOUNT,      51343385 AS CHARGE_ID FROM DUAL UNION
    SELECT 'SALES' AS TYPE,   698  AS AMOUNT,      51343385 AS CHARGE_ID FROM DUAL UNION
    SELECT 'RETURN' AS TYPE,   -697.90  AS AMOUNT,      51446663 AS CHARGE_ID FROM DUAL UNION
    SELECT 'GST' AS TYPE,   -69.80  AS AMOUNT,     51446663 AS CHARGE_ID FROM DUAL
    ) SELECT CHARGE_ID, DECODE(TYPE, 'GST', AMOUNT, 0) TOTAL_GST, DECODE(TYPE, 'GST', 0, AMOUNT)TOTAL_SALES  
    FROM  T 
    ORDER BY 1 ASC
    

    the desired output.

    CHARGE_IDTOTAL_GSTTOTAL_SALES
    513433824.741.7
    51343383279.372793.7
    51343384-250-2500
    51343384279.372793.7
    5134338569.8698
    51446663-69.8-697.9

    Hello

    SELECT charge_id

    , SUM (DECODE (type, 'GST', amount, 0)) AS total_gst

    , SUM (DECODE (type, 'GST', 0, amount)) AS total_sales

    T

    GROUP BY charge_id

    SIGN (amount)

    ORDER BY charge_id

    ;

    Oh, I see what you want!  You want a separate line of production, for each distinct charge_id and for all the distinct combinations of charge_id and amount (positive and negative) sign.  Just add another line for the GROUP BY (and, if you wish, ORDER BY) clause:

    SELECT charge_id

    , SUM (DECODE (type, 'GST', amount, 0)) AS total_gst

    , SUM (DECODE (type, 'GST', 0, amount)) AS total_sales

    T

    GROUP BY charge_id

    SIGN (amount)

    ORDER BY charge_id

    SIGN (amount)

    ;

    This property returns exactly what you posted.

    SIGN the declarations of (amount) + 1 if the amount is positive, and -1 if the amount is negative.  If amount = 0, then it returns 0, and if the amount is NULL, returns the NULL value.  Can you have amounts 0 or NULL in your data?  If so, would what results you?  You may need to use an expression BOX instead of (or in addition to) SIGN.

  • SQL Group function

    --General Employee table
    -- Version:  oracle 11g Rel 2
    
    create table employee (ID varchar2(100),first_name varcha2(200),last_name varchar2(200),start_date date,end_date date,city varchar2(100))
    
    select listagg(First_name,',') within group (order by first_name) from employee  group by city ;
    op:
    1. XXX,YYy,ZZZ
    2. AAA,SSS
    
    Excepted OP:
    
    1. 1.XXX,2.YYY,3.ZZZ
    2. 1.AAA,2.SSS
    Need a query sql for obtaining the planned op, please notify

    Thanks in advance
    Carole Kumar

    Edited by: 876377 may 1, 2012 22:04

    876377 wrote:

    --General Employee table
    -- Version:  oracle 11g Rel 2
    
    select listagg(First_name,',') within group (order by first_name) from employee;
    op:
    1. XXX,YYy,ZZZ
    2. AAA,SSS
    
    Excepted OP:
    
    1. 1.XXX,2.YYY,3.ZZZ
    2. 1.AAA,2.SSS
    

    Need a query sql for obtaining the planned op, please notify

    Thanks in advance
    Carole Kumar

    Try to use

    row_number over (partition by ID_COLUMN order by first_name) as RN
    

    And then

    listagg( rn || first_name)
    

    Since you don't validate your description of table we do not know what are the columns, etc... I guessed that the ID column is named ID_COLUMN, adjust accordingly.

  • Function group &amp; order by function

    Hi all; »

    When we use function group & sort function. Always I get the error message.

    SQL > select sum(bytes/1024/1024), NAME of v$ datafile including the group by name.

    where the group by name

    * ERROR on line 2:

    ORA-00936: lack of expression

    SQL > select sum(bytes/1024/1024), NAME, FILE number of v$ datafile where order by case number;

    where to order by case number

    *

    ERROR on line 2:

    ORA-00936: lack of expression

    SQL > select name, sum (bytes/1024/1024), the status of v$ datafile where ts #= '4' group of FILE #;

    Select name, sum (bytes/1024/1024), status from v$ datafile

    *

    ERROR on line 1:

    ORA-00979: not a GROUP BY expression

    SQL > select name, sum (bytes/1024/1024), the status of v$ datafile where TS #= '4';

    Select name, sum (bytes/1024/1024), status from v$ datafile

    *

    ERROR on line 1:

    ORA-00937: not a single group group function

    Thanks in advance...

    Hello

    GTS (DBA) wrote:

    ...

    I need output only for ts #= '4' only... I mean

    Select sum(bytes/1024/1024), NAME from v$ datafile {only for ts #= 4}

    ...

    This looks like a job of a WHERE clause:

    SELECT SUM (bytes / 1024 / 1024) AS megabytes

    name

    folder #.

    V $ datafile

    WHERE the ts # = 4-* NEW *.

    GROUP BY name

    folder #.

    ORDER BY line #.

    ;

  • Expert SQL 1Z0-047: all functions are examined or just groups?

    Review of press of Oracle book says that all functions can be included in the review (Chapter 6 use of the box shows a row functions p.234 review)
    and reffer the manual reference

    And as I see the book and review group (Aggregate), specific einreihig, date on which the ordinary functions of Expressions and page are reviewed.
    With the help of line features unique to customize the output

    Describe the different types of functions that are available in SQL
    Describe the use of the conversion functions
    Use of character, number, date functions in SELECT statements
    -Describe the use of functions of Group
    Identify the Group functions available
    Use the group for aggregate functions
    -Use datetime functions
    -Regular expressions
    of the foregoing, I guess that the bellows are out of the review
    XML
    Data mining

    So what really are the functions examined gtoups?

    So what really are the functions examined gtoups?

    Nowhere (or at least anywhere outside the Oracle education) is a list of all of the specific functions that will be under review. Besides, "will be" more properly would be written "could be" since all takers single review never sees all possible questions. A given function may be on the test for some people and not others.

    When deciding on what features to include, what I've done (and I suppose that Steve did) was to look through the different functions of a specific type (i.e. conversion functions) and the weight of each based on how the function is common in my experience. I have included these functions which I consider to be seen more often and so that no matter what SQL expert expected to know on top of their head. That said, the review Expert SQL takes pleasure in the dark. I've seen this most often in variations of syntax, but it is possible that review manufacturers choose a function to include simply because it is rarely used. While I don't remember all these appearing on the exam that I took, I can't exclude that possibility and so my guide at the end of the functions section States it much more listed there in the SQL Reference Guide which peuvent appear in the review.

    That said, learn the ins and outs of more functions that you might really need to review is not a bad thing. Because you indicated that you are interested in the real expertise rather than the skills of paper, limit you just to the focus of the review is not intuitive. I guarantee you there are a lot of things I know about SQL for years to work in the language that are not on the subjects of examination.

  • How to display the column single line with function of nested groups

    SQL > select deptno, Max (sum (sal)) SalSum
    2 of PEM
    3 Group of deptno;
    Select deptno, Max (sum (sal)) SalSum
    *
    ERROR on line 1:
    ORA-00937: not a single group group function

    Can you please help me to get the Max (sum (sal)) with Deptno...

    Or:

    select max(deptno) KEEP (DENSE_RANK LAST ORDER BY SalSum) deptno,
    max(SalSum) from  (
      select deptno,sum(sal) SalSum
      from emp
      group by deptno
    );
    

Maybe you are looking for

  • iPhone will not stay connected to the internet?

    * Posted on MacRumors forums but no answers *. So basically since a few days my phone sometimes don't remain not connected to the internet network of BT-Hub3. I connect to it and then sometimes, it will stay connected for a minute for a few seconds a

  • Cannot install program on a hidden on the Satellite P100-387 partition

    Hello I have a P100-387. Using Partition Magic 8.0 I divided the disk into 5 partitions.Now, I have problem with the software instalation like MS Office, Java Runtime approx...Error message: "Error 1327. Wronng drive H:\ ».The "H" partition is hidden

  • HP 15r205tu: State failure in bootnig and unable to reduce the brightness of the display of power

    I bought HP 15r205tu notebook on 19/05/2015 and installed windows OS 8.1, but when the OS starts, I get error DRIVER_POWER_STATE_FAILURE. I did already reinstall OS twice but no luck. Another problem with the function of luminosity. Impossible to red

  • HP support starts do not.

    I have a Hp Pavilion 15 lovely to windows 8.1 since then Hp Support Assistant does not start it fair guests a message "a restart is required to complete the installation with 2 options restart now or remind me ' have rebooted several times, but alway

  • Divide the number of string data

    I have user as J1 entries. A1 through J1. A20 that I want to get the given text range 1 to 20, Please share me the logic Concerning Vikram Kumar P