The group in question.

Hi all me please solve the problem of Group of... in the following query

When I use Group by I get results like:

County
----------
22
3
2
1

and with Group of I get the output in form:

County
----------
24


why I get the difference in the numbering... can you solve my question please...

Query
----------


SELECT count (distinct PRD. PRODUCT_KEY) 'count' OF WWOWNER. CMP VMRS_COMP_CODE, WWOWNER. PRODUCT PRD, WWOWNER. CLAIM_FACT CF, WWOWNER. DEALER DLR,
WWOWNER. REQUEST OF CLM, WWOWNER. CS CLAIM_SERVICE
WHERE
Substring (COALESCE (CMP. VMRS_CODE,' '), 1, 3) = "A01".
And
PRD. PRODUCT_KEY = CF. PRODUCT_KEY
AND BECAUSE CLM_REQUEST_TYPE = "payment".
and because CLM_STATUS in ('APPROVED' 'CREDIT', 'Dependant', 'CLOSED', 'PARTS of RETURN')
and because CLAIM_TYPE = 'guarantee '.
and (CS. SRVC_CAUSAL_CODE <>"IDP" or
DSI SRVC_CAUSAL_CODE IS NULL)
and because CLM_CREATE_DATE between January 1, 2000 "and on January 1, 2010"
and because CLAIM_KEY = see CLAIM_KEY
and CMP. VMRS_KEY = SEE VMRS_KEY
- AND THE DLR. DLR_SRC_CD = '10101'
AND DLR. DEALER_KEY = SEE DEALER_KEY
GROUP CMP. VMRS_CODE

This is because you have a SEPARATE in your expression:

  count(distinct PRD.PRODUCT_KEY)

With the group you get the distinct product_key by group.
You get the distinct product_key overall of the.

Saying that group 1 has the keys A, B, C.
And the Group 2A keys C, D, E.

Then in group by your account will be 3 and 3.
Without this will be 5.

Toon

Tags: Database

Similar Questions

  • Virtual router does not work-«the group or resource is not in the appropriate State to make the request in question»

    I installed virtual router manager v1.0 but his does not work. When I leave router virtual by connection to the local network from my laptop, its shows an error. It is «the group or resource is not in the appropriate State to make the request in question» Please give me the solution of this problem. I want to start the virtual router and use the internet connection with other devices.

    I installed virtual router manager v1.0 but his does not work. When I leave router virtual by connection to the local network from my laptop, its shows an error. It is «the group or resource is not in the appropriate State to make the request in question» Please give me the solution of this problem. I want to start the virtual router and use the internet connection with other devices.

    Thank you so much for viewers. Virtual router works properly. I use internet for my laptop for my other devices.

  • A question about the analytical function used with the GROUP BY clause in SHORT

    Hi all

    I created the following table named myenterprise
    CITY       STOREID    MONTH_NAME TOTAL_SALES            
    ---------- ---------- ---------- ---------------------- 
    paris      id1        January    1000                   
    paris      id1        March      7000                   
    paris      id1        April      2000                   
    paris      id2        November   2000                   
    paris      id3        January    5000                   
    london     id4        Janaury    3000                   
    london     id4        August     6000                   
    london     id5        September  500                    
    london     id5        November   1000
    If I want to find which is the total sales by city? I'll run the following query
    SELECT city, SUM(total_sales) AS TOTAL_SALES_PER_CITY
    FROM myenterprise
    GROUP BY city
    ORDER BY city, TOTAL_SALES_PER_CITY;
    that works very well and produces the expected result, i.e.
    CITY       TOTAL_SALES_PER_CITY   
    ---------- ---------------------- 
    london     10500                  
    paris      17000            
    Now in one of my books SQL (Mastering Oracle SQL) I found another method by using the SUM, but this time as an analytic function. Here's what the method of the book suggests as an alternative to the problem:
    SELECT city, 
           SUM(SUM(total_sales)) OVER (PARTITION BY city) AS TOTAL_SALES_PER_CITY
    FROM myenterprise
    GROUP BY city
    ORDER BY city, TOTAL_SALES_PER_CITY;
    I know that the analytic functions are executed after the GROUP BY clause has been transformed completely and Unlike regular aggregate functions, they return their result for each line belonging to the partitions specified in the partition clause (if there is a defined partition clause).

    Now my problem is that I do not understand what we have to use two functions SUM? If we only use one only, i.e.
    SELECT city, 
           SUM(total_sales) OVER (PARTITION BY city) AS TOTAL_SALES_PER_CITY
    FROM myenterprise
    GROUP BY city
    ORDER BY city, TOTAL_SALES_PER_CITY;
    This generates the following error:
    Error starting at line 2 in command:
    SELECT city, 
           SUM(total_sales) OVER (PARTITION BY city) AS TOTAL_SALES_PER_CITY
    FROM myenterprise
    GROUP BY city
    ORDER BY city, TOTAL_SALES_PER_CITY
    Error at Command Line:2 Column:11
    Error report:
    SQL Error: ORA-00979: not a GROUP BY expression
    00979. 00000 -  "not a GROUP BY expression"
    *Cause:    
    *Action:
    The error is generated for the line 2 column 11 which is, for the expression SUM (total_sales), well it's true that total_sales does not appear in the GROUP BY clause, but this should not be a problem, it has been used in an analytical function, so it is evaluated after the GROUP BY clause.

    So here's my question:

    Why use SUM (SUM (total_sales)) instead of SUM (total_sales)?


    Thanks in advance!
    :)





    In case you are interested, that's my definition of the table:
    DROP TABLE myenterprise;
    CREATE TABLE myenterprise(
    city VARCHAR2(10), 
    storeid VARCHAR2(10),
    month_name VARCHAR2(10),
    total_sales NUMBER);
    
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('paris', 'id1', 'January', 1000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('paris', 'id1', 'March', 7000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('paris', 'id1', 'April', 2000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('paris', 'id2', 'November', 2000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('paris', 'id3', 'January', 5000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('london', 'id4', 'Janaury', 3000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('london', 'id4', 'August', 6000);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('london', 'id5', 'September', 500);
    INSERT INTO myenterprise(city, storeid, month_name, total_sales)
      VALUES ('london', 'id5', 'November', 1000);
    Edited by: dariyoosh on April 9, 2009 04:51

    It is clear that thet Analytics is reduntant here...
    You can even use AVG or any analytic function...

    SQL> SELECT city,
      2         avg(SUM(total_sales)) OVER (PARTITION BY city) AS TOTAL_SALES_PER_CITY
      3  FROM myenterprise
      4  GROUP BY city
      5  ORDER BY city, TOTAL_SALES_PER_CITY;
    
    CITY       TOTAL_SALES_PER_CITY
    ---------- --------------------
    london                    10500
    paris                     17000
    
  • I figured out how to create a contact group and add contacts to the group, but here's a stupid question: how in the heck actually send an email to the Group?

    I go to "create mail", then "Tools", then "windows contacts" where I see the name of the group that is listed.

    Then what?

    Hello

    Read article 2:

    http://www.Vistax64.com/tutorials/69738-contact-groups-Windows-mail.html

  • Two questions - a clipping mask and color change in the Group

    Hello

    I have a file I rendered in Maya as a vector. I'm not that great with illustrator, so I was trying to speed things up...

    In any case, it appears all of the files have a clipping mask. If I unrelease, it shows a plain with a similar dimensions that is the original color of the object. See picture for before and after...

    In addition, article even says it's in a group. For this reason, I can't seem to change its color, and the separate button is gray... very confusing.

    Jaredlogprob.jpg

    To group or ungroup, you must first select the art.

    You can do this with a tool of choice or use the layers panel by clicking to the right of the circle of the name of the groups.

    Then disassociate will be available but it is not necessary to separate so deit if you double-click on the group with the selection tool black arrow he'll bring you back in the isolation mode of the group which will allow you to change the group, as if they were individual objects that are separating.

    When you have finished double click anywhere outside the group to leave the isolation mode. You will find this feature will be preventing them from making bald, because you him tear not all outside whenb group edition in complex projects.

    Regarding the change of color as already mention Nedopil > change color > Recolorier Art more or less the same kind of protection mounting which can save you aggravation in the art complex.

  • Integration of the EBS - group permission question

    I have installation OBIEE thanks to the integration of the EBS. The part of authentication works very well. I have problems with my group permissions.

    I created two responsibilities EBS, groups of RPD and presentation catalog groups with the same exact name:
    -BI administrator
    -BI user
    The BI administrator group has admin access and BI users group has just basic access.

    Here is what I noticed:
    1. when a user connects to the EBS and clicks on the responsibility of the administrator of BI, it gets successfully in OBIEE with admin access. If the same user opens a new browser or even using a different computer and selects the user BI, it still gets admin access.

    2. I have the Server BI and BI Presentation Server. I use the same user and this time click the BI user first. He gets successfully in OBIEE with basic access. If the same user opens a browser or use another computer and selects the responsibility of BI administrator, it still gets access to basic user.

    There is no "Logout" button when you configure the EBS with OBIEE integration. I think the problem is that the group permission is stored in the memory of the server somewhere usually, it gets deleted when the user clicks on logout, but it is not available. Does anyone know how I work around this problem?

    Hello

    to add a logoff link, you can add this entry in your Auth section in instanceconfig.xml file

    http://caeobie03.caecorp.CAE.com:7001/Analytics/saw.dll?logoff

    THX

  • I have a large group of students to the text but I don't want these numbers shared by the group that I can bcc texts?

    What is the community for my question? Students enrolled in a course using their cell #s and I want to text them as a group, but I don't want the numbers shared by the group.

    No ITC in Messages

  • Video link of the Group

    How can I set up a video link of the group between 3 people using a Macbook Air?

    Hi, C12T and welcome to the community,

    Here's how to set up a group on Mac video call:

    https://support.Skype.com/en/FAQ/FA10801/making-a-group-video-call-Mac

    Kind regards

    Elaine

    __________________________________________________________________________________________________
    Your question has been answered? Please click on the link to accept as a Solutionfor everyone can quickly find what works! As a post or want to say, 'Thank You ' -? Click on the button of congratulations!
    Reliable information: Brian Krebs: 3 basic rules for online safety

  • Server domain membership in the group Windows 2003 functional level - windows API

    Hello

    I'm a programmer trying to get the members of a group of global domain by using windows server 2008 enterprise edition

    in the past it was not a windows server 2003 functional level, but when the 2003 functional level appeared a new features have been added such as the addition of

    a global group as a member of another global group in the domain,

    in the past, the written API could obtain the Member if the Member is a user, but you cannot find a member if it is a global group.

    I use this "NetGroupGetUsers" API to get a members of a domain global group and he gets the users but it does not get the

    Members if they were global groups...

    I tried an other API "NetLocalGroupGetMembers" it becomes a global group as a member but it only works if the owner was a local group on the server
    or on another machine which is added to the server, but this API does not work if the owner of the Group was a domain global group.

    My question is how to get the members of a global group whose members who are global groups too?

    Thank you

    -Shomaf

    Try asking in the Windows Server forum:
    http://social.technet.Microsoft.com/forums/en-us/category/WindowsServer

  • I want to remove the group members in AD

    I want to remove the group members in AD using c# currenlty referring to the code on MSDN avliable

    http://msdn.Microsoft.com/en-us/library/Windows/desktop/aa772133 (v = vs. 85) .aspx

    but make error on line

    objGroup = objADAM.Children.Find (strGroup, 'group');

    Error message:-there is no such object on the server.

    Please suggest

    Hi Stephen,.

    I understand that you need to remove the Member of group in AD.

    The problem you are having is more complex than what is generally answered in the Microsoft Answers forums. It is better suited to the MSDN forums.

    Please post your question in the MSDN Forums.

    You can follow this link to ask your question:

    http://msdn.Microsoft.com/en-us/vstudio/aa718325.aspx

    For any other corresponding Windows help, do not hesitate to contact us and we will be happy to help you.

  • Windows could not connect to the Group Policy client service

    I get the error message after restarting my laptop with Vista Home:

    Windows could not connect to the Group Policy client service. This problem prevents limited users to logon to the system and administrative user, you can view the log of events system for details why the service did not respond.

    I'm the only user on my laptop with laptop admin rights works correct with few programs but it seems that I have no ADMIN rights now. I have not authorized for the restoration of the system, start-up ccleaner.exe, instalation of new software, etc.

    I tried this:

    1.

    http://social.answers.Microsoft.com/forums/en/vistasecurity/thread/bbfe3246-0ceb-4899-BFBA-7a98e642c009

    with hidden Admin, but for Admin hidden even in safe mode was not allowed to change my account more up/down.

    My laptop have orginal Vista and I have no bootable CD.

    2.

    http://social.technet.Microsoft.com/forums/en/winserverGP/thread/5de9f483-ff69-4fac-ac3f-601a62cc78d1

    result:

    netsh

    Netch > winsock reset

    Elevation of the requiries the requested operation.

    Help, please.

    Hi SSergo,

    Your question is more complex than what is generally answered in the Microsoft Answers forums. It is better suited for the IT Pro TechNet public. Please post your question in theTechnet Group Policy Forum

    Lisa
    Microsoft Answers Support Engineer
    Visit our Microsoft answers feedback Forum and let us know what you think.

  • Support for the 'grouping' Dual LAN

    I bought a router of WRT600N, which was far & away the router wireless dual band to use more expensive (& only) available at the time + 2 compatible Ultra Range Plus USB receivers.  Apparently Linsys/Cisco decided to abandon this model & more support - still firmware version 1.0 (from 2008).  OK, then repeat ceMarketing not high on their priorities.

    I recently upgraded my hardware in a platform Intel 1156 running Win 7 Ultimate 64-bit completely.  The new motherboard, a Gigabyte GA-P55-UD5, has a 'dual LAN' support that allows "bundling" - potentially 2 GB support & self-switching if a port is not functional.  Apparently, it requires a router that has 'IEEE 802.3ad' capabilities.  As far as I can tell, this potentially interesting feature only is not supported, & the firmware upgrade failure suggests it will be never. - bought their "Network Magic" software Pro to add another $50.

    So the question is this: I believe - no double support LAN is built in & never will be--or is there a way to use this feature?  Suffice to say, if I paid about $420 for the router & USB receivers where if other router support him on the level of consumption, I will never consider a Linksys/Cisco product in this life.

    Thanks for some clarity - that someone has to offer.

    I would say the associations are no consumer router function. If you really need a connection of 2 Gbps to a single device to your network, I wonder what other device to communicate with this speed. It is not only another device because it would have only 1 GB/s unless you team two remaining ports as well. (Do not forget that desktop computers more level of consumption are not yet fast enough to offer or receive data at a rate even if they have a Gigabit ethernet port).

    If you have a set of other features which, in combination, require 2 Gb/s access server, then you will have again the same problem: it must connect somewhere which means you need a switch that must be connected to the two remaining LAN ports. But then, you might as well get a switch that supports reunification and enough ports and connect everything what he. Of course, an ethernet switch that supports the grouping is usually some 'smart' managed switch that cost easily more then your WRT600N.

    So I think that grouping will be never supported on any Linksys consumer device. If you then you must watch the Cisco Small Business series or better. They have some devices supporting 802. 1 q VLAN and therefore potentially also 802.3ad. Although even in this case I doubt because given the number of ports available on these devices is not really a lot of sense to support at least on a router 4 ports. Devices consumer and SOHO are not for internet connections of 1 Gbit/s or more. So you can only use the speed inside the LAN, but with 4 ports that would be difficult... So I would say that by their design these routers don't support grouping. If you need grouping within your LAN, get a managed switch...

  • Cannot connect administrator account. Error - the Group Policy Client service has no logon. Access is denied

    Original title - MESSAGE of ERROR

    Hello

    I am runnung Windows Vista on my laptop Toshiba A200. As of a few days ago, asking that I try to open a session (I'm the admin), I get an error message saying "the Group Policy Client service does not log. Access is denied. »

    I managed to get in the "back door" through my wife and did a system full scan with Norton and Spybot and neither found anything unusual. He asked me to change my user account settings, but of course, because my wife is not the admin, he won't let my do changes.

    In addition, some of my software, such as Final draft, also seem to have vaporized.

    Help!

    Thanks in advance,

    Steve Hayward

    Hi stevehayward

     

    1. is the computer on a domain?
    2. during how long have you had this problem?

     

    If the computer is not connected to the domain, you can start in safe mode, and then try to perform a system restore.
    Step 1
    :
    In safe mode; you have access to only the drivers and base files. Check out the link to start the computer in safe mode and then check-
    http://Windows.Microsoft.com/en-us/Windows7/start-your-computer-in-safe-mode

     

    Step 2:
    You can perform a restore of the system to a previous point, when the issue was not present. The System Restore tool uses points of restore to return the system files and settings to an earlier point in time. You can use it to restore the operating system to a point in time where you have not experienced the problem.

    Note: When you use System restore to restore the computer to a previous state, programs and updates that you have installed are removed.

    To do this, there must be a restore point from the system in which the connection was successful.

    Please refer to the below of the help links on performing a system restore.
    http://Windows.Microsoft.com/en-us/Windows-Vista/what-is-system-restore
    http://Windows.Microsoft.com/en-us/Windows-Vista/system-restore-frequently-asked-questions

    I hope this helps.

  • EqualLogic - how to level a new table before you add to the Group

    I have a new table which is v7 and I try to add a group of v8.  It won't join the group due to version incompatibility.  How to pass it to v8 so I can join the Group?  Thank you.

    Hello

    Create a new group with one member.  I wouldn't use the Remote Setup Wizard to do this.  Who sets policy RAID that requires you to wait that ends before you can upgrade the firmware.

    I would rather the serial port.  Then, you need to only configure port network and the new IP group.

    Once you answer the basic questions are the GrpName > cli prompt you can then transfer the kit to upgrade and update the firmware.

    Once you run the "update" process and restarted the table, reconnect and make sure it is in the new revision.  GrpName > show Member which will show.

    The CLI run "reset" to return unit to factory reset, and you can now add in your other group.

    Kind regards

    Don

  • Removable storage to access folder is missing from the group policy under Administrative Templates\Systems

    Hello

    I intend to control the reading and writing of removable storage devices using Windows Server 2008 GPO.

    However, after reading the online group policy settings, when I tried to apply the GPO settings, I found that 'Access to removable storage' folder is missing from the group policy under administrative Templates\Systems.

    Please suggest others.

    Thank you

    Amit Jogi

    Hi Amit,

    Thanks for posting your query in Microsoft Community. However, your question is beyond the scope of what is generally answered in this forum of consumer and would be better suited for the IT Pro TechNet public.

    Please post your question in the TechNet Forums.

    Thank you.

Maybe you are looking for