Count(*) giving different record count than Group by

I have a table which is giving me different record counts as below:
SELECT COUNT(1) FROM tbl_A --45104 records
SELECT ID,COUNT(*) FROM tbl_A GROUP BY ID ORDER BY 1   --42084 records(ID is the primary key)
Any idea why this will happen?

Can you quickly show us what the below are returning?
SELECT COUNT(ID) FROM tbl_A
SELECT ID,COUNT(ID) FROM tbl_A GROUP BY ID ORDER BY 1

Similar Messages

  • Download from IR has different record set than on screen

    Apex IR ( 3.2) query uses 2 page items to filter. Results are correct on screen but when downloaded we get a different record set as if one of the 2 Page items has not been passed in.

    If you are having problems with the prints being a different size than what is on the screen, I believe there are two settings to try to adjust.  If you are using IE, you can check the Page button with the arrow down and look for "Text Size." Mine is set to "Medium."  Also you can go to the picture of the printer at the top and select the arrow down next to it and select Page Setup.  From there, you will see Enable Shrink-to-Fit which may be causing the problem or you can change the font type and size. Do you see these options?
    If not, what kind of computer do you have and what web browser are you using?
    Don't forgot to say thanks by giving "Kudos" if I helped solve your problem.
    When a solution is found please mark the post that solves your issue.
    Every problem has a solution!

  • Count the number of records in a group

    Hi ,
    My requirement is to display in the BI reprt - records in Order Entry Line Items based on several conditions on the fields.
    If the above conditions do not returm any records ,show an error message - NO DATA FOUND.
    1.checked in standard RTF templates where its a simple example as if :not(//servicereq).
    But ,my RTF has serveral conditions on the group.
    2.Is there a way to take a count of records in the group which statisfy the given condotions,so that I can checkif count = 0 .dislay message.
    Apreciate your help.
    Regards.

    Ummmmm...no I didn't, hate to admit it.
    Added the declaration to the 2 percentage formulas. Now I do get results for the percentage...they are just wrong. Only pattern I've found is that if the running total of Int or Ext is 1, the percentage is 11.39. If it is 2, the percentage is 22.78 and so on.
    Each percentage is a multiple of 11.39 depending on the respective running total calculation. Maybe you can see what I have obviously missed.
    NAME........TOTAL.......TOTAL Int........% Int........TOTAL Ext........%Ext
    Burberry........20..............4..................45.56.............16 ..............182.23
    Cellarosi.......11..............1 .................11.39.............10................113.90
    Chalkley.......19..............2..................22.78.............17................193.62

  • How to get count of group of current login user if AD Group is added in SharePoint Group?

    My Client has 2 SharePoint Application. For the AD Users they have created AD Group and added users in that AD Group as per requirement. Later AD Group is added in SharePoint Group. When I'm trying to fetch Current User Group count, I can able to get the
    count of Groups using below statement.
    int groupCount = SPContext.Current.Web.CurrentUser.Groups.Count;
    Above Statement, returns always 0 value if I tried with User who are added in AD Group and if I add AD User and then it will return the exact count.
    Please suggest solution to get Count of Group of Current User. My Application contains more than 60 SharePoint group.

    Hello,
    I believe your code doesn't count those AD group users until they login at least once. If this is the case then try to use "SPUtility.GetPrincipalsInGroup" as suggested in below post:
    http://stackoverflow.com/questions/4314767/getting-members-of-an-ad-domain-group-using-sharepoint-api
    Hemendra:Yesterday is just a memory,Tomorrow we may never see
    Please remember to mark the replies as answers if they help and unmark them if they provide no help

  • My itunes account keeps giving me this Error message. "You are signed in with a different Apple ID than previously used with podcasts. I only have one Apple ID. What do I do?

    My itunes account keeps giving me this Error message. "You are signed in with a different Apple ID than previously used with podcasts. Do you want to sync these podcasts subscriptions and stations with "gajppl""  gajppl is my only Apple ID. What do I do?

    Please sign out of the iTunes Store by selecting
    Store ▹ Sign Out
    from the iTunes menu bar. Then sign back in.

  • Count(*) with group by max(date)

    SQL> select xdesc,xcust,xdate from coba1 order by xdesc,xcust,xdate;
    XDESC XCUST XDATE
    RUB-A 11026 01-JAN-06
    RUB-A 11026 05-JAN-06
    RUB-A 11026 08-JAN-06
    RUB-A 11027 10-JAN-06
    RUB-B 11026 02-JAN-06
    RUB-B 11026 08-JAN-06
    RUB-B 11026 09-JAN-06
    RUB-C 11027 08-JAN-06
    I want to make sql that result :
    XDESC     COUNT(*)
    RUB-A     2
    RUB-B 1
    RUB-C 1
    Criteria : GROUPING: XDESC XCUST AND MAX(DATE)
    bellow mark *** that was selected in count.
    XDESC XCUST XDATE
    RUB-A 11026 01-JAN-06
    RUB-A 11026 05-JAN-06
    RUB-A 11026 08-JAN-06 ***
    RUB-A 11027 10-JAN-06 ***
    ---------------------------------------------------------COUNT RUB-A = 2
    RUB-B 11026 02-JAN-06
    RUB-B 11026 08-JAN-06
    RUB-B 11026 09-JAN-06 ***
    ---------------------------------------------------------COUNT RUB-B = 1
    RUB-C 11027 08-JAN-06 ***
    --------------------------------------------------------COUNT RUB-C = 1
    Can Anybody help ?
    I tried :
    select xdesc,max(xdate),count(max(xdate)) from coba1 group by xdesc
    ERROR at line 1:
    ORA-00937: not a single-group group function
    Thank

    This one is duplicate. see the following link
    Count(*) with group by max(date)
    Thanks

  • SUB-Group consol. in different currency i.e. other than group currency

    HI Friends,
    Consolidation Group currency is "USD". In the consolidation hierarchy, i have one sub group where all the companies are in AUD.
    Now the requirement is that australian sub group requires sub consolidation in AUD.
    Currently we are doing sun consolidation and the results are as expected, but they are in group currenmcy "USD".
    Is there any option to get the sub groupconsolidation report in AUD i.e. different than group currency.
    Thanks in advance,
    Regards,
    Richard

    Hi ,
    Yes it is possible.
    Direct in UCMON and change your group currency, but you must do again full proces consoidation in this group currenct,  or in  your query (query designer) you create a new report and use transaltion currency direct in report.
    http://help.sap.com/saphelp_erp60_sp/helpdata/en/62/f7e73ac6e7ec28e10000000a114084/frameset.htm
    Please, read Consolidation in Multiple Group Currencies .
    Regards, 
    anka
    Edited by: Anka on Jul 8, 2010 4:37 PM

  • When I synch, a lot of songs have higher play counts than actual play. What to do to ensure integrity of play counts?

    When I synch my iPhone to my MAC, a lot of songs have higher play counts than actual. What can I do to ensure integrity of play counts?

    If you're talking about "regular" icloud, then setting it up should have no effect on your music.  Try syncing the device to iTunes and check the music settings and sync again.
    If you subscribe to iTunes Match, is the device in wifi range?

  • How to keep the Recent Call Record more than a week?

    How to keep the Recent Call Record more than a week? I found the iPhone only can keep the Recent Call Record for only a week.

    I have to disagree with your response with respect. My i phone is limiting me to call going back only 7 days ie today is 29 July and my call log will only go back to 22 July. I have only 40 calls logged for that period. I cannot view up to the 100 you mention. I have included all calls for a single caller as well ie one caller shows 7 so ive counted that as 7 calls. There appears no way to set up to 100 in the settings
    Thanks
    Graham

  • Want to get sum/avg first 90% records  in each grouped record set.

    Hi Gurus,
    Need your help or example query which help me to achieve sum/avg first 90% records in each grouped record set. Let me show you the basic query and output and proposed output.
    select Pid, Sum(SalesAmt) TotalSaleAmt, Avg(SalesAmt) AvgSaleAmt, count(*) NoOfSales from ProductSales group by Pid;
    PID TotalSaleAmt AvgSaleAmt NoOfSales
    1 12000 100 120
    2 24000 50 480
    Now I need for PID =1 TotalSaleAmt of first 90% of NoOfSale i.e.120(this is basically nuber of rows found in PrdocutSales Table).
    I hope I am clear enough explain my requirement... I would appreciate if we have some Analytical function available..
    Gurus Pls help me asap..
    Thanks In adavance...
    Srichan.

    Now I need for PID =1 TotalSaleAmt of first 90% of NoOfSale i.e.120(this is basically nuber of rows found in PrdocutSales Table).
    first 90% should mean first 90% by some order, so in this case, which 108 rows (of the 120) do you want to take into consideration?
    with
    the_sample as
    (select 1 the_pid,10 the_sale,1 the_order from dual union all
    select 1 the_pid,20 the_sale,2 the_order from dual union all
    select 1 the_pid,15 the_sale,3 the_order from dual union all
    select 1 the_pid,12 the_sale,4 the_order from dual union all
    select 1 the_pid,12 the_sale,5 the_order from dual union all
    select 1 the_pid,13 the_sale,6 the_order from dual union all
    select 1 the_pid,19 the_sale,7 the_order from dual union all
    select 1 the_pid,11 the_sale,8 the_order from dual union all
    select 1 the_pid,15 the_sale,9 the_order from dual union all
    select 1 the_pid,12 the_sale,10 the_order from dual union all
    select 2 the_pid,25 the_sale,1 the_order from dual union all
    select 2 the_pid,22 the_sale,2 the_order from dual union all
    select 2 the_pid,22 the_sale,3 the_order from dual union all
    select 2 the_pid,23 the_sale,4 the_order from dual union all
    select 2 the_pid,29 the_sale,5 the_order from dual union all
    select 2 the_pid,21 the_sale,6 the_order from dual union all
    select 2 the_pid,25 the_sale,7 the_order from dual union all
    select 2 the_pid,22 the_sale,8 the_order from dual
    select the_pid,the_sum,the_avg
      from (select the_pid,
                   sum(the_sale) over (partition by the_pid order by the_order) the_sum,
                   round(avg(the_sale) over (partition by the_pid order by the_order),2) the_avg,
                   the_order,
                   floor((0.9 * max(the_order) over (partition by the_pid))) to_pick
              from the_sample
    where the_order = to_pickRegards
    Etbin

  • Creation Info Record at Material group,Source List & Assign source to PR

    Hi All,
    Mine is a typical requirement, I would like to create a Info Record at Material Group level and create Source list for the Material & Plant combination. Now for this combination, I would like to create PR & assign source for this PR.
    Completed at my end:
    1. Creation of Info Record at Material Group level
    2. Maintained Source List at Material level.
    Issues/ Errors:
    1. Info Record does not exist for the combination of Material & Vendor combination (which is true & I do not want it also)
    2. Material differs from the Material from the Info Record.
    Help / Information required :
    1. Setting MRP relevant "1" for the Source List and for checking the field "Fix".
    2. Assigning the Source in PR (in ME57)*Can anyone provide solution to the above
    Can anyone please provide the soilution to the above points?
    Thanks in advance for the solution.
    Regards,
    Pavan.

    Hi Please create Contract and refer same while source list. This will help
    Regs,
    AD

  • Info Records Per Material Group Standard Report Not Running at All.

    Hi Experts,
    We had a Small problem Where while Running Info Records Per Material Group(T-code ME1W ) Standard Report the Report is not Showing any output in PRD, where else running Info Records Per Material (T-Code ME1M ) Standard Report the Output is getting Displayed.
    Our System is Currently SAP EEC 6.0 & Application Package SAP_APPL is of release 604     & Level 0007, Highest Support Package is SAPKH60407.
    is this Issue covered in Some OSS Note?
    Thanks & Regards
    Priyesh Shah

    Hi,
    The info-records for the materials which appears in the standard report ME1M/ME1L is different from the one which appear in ME1W.
    If you try with the material groups of the ME1L or ME1M info-records it wont be displayed in ME1W.
    ME1W will display only the info-records which are created @ material group level.
    i.e. try to create a new info-record using ME11 without entering material, in the general data screen you have to enter the material group & other parameters.
    Now once you save this info-record,same will appear in ME1W.
    Hope its clear.
    Thanks & Regards,

  • Hi gurur's in BDC for recording other than SHDB any process is there

    hi gurur's in BDC for recording other than SHDB any process is there

    Hi,
    I think as such there is no other process. You can do the recording through transaction SM35 as well, go there and click on new recording. You can do the recording this way also but this is not different from SHDB.
    Reward if this clarifies your doubt.
    Regards,
    Lalit Kabra

  • How to Setup a JSP to Run on Different Physical Location than OC4J Defaul

    I am trying to setup a development environment for jsp application development in Oracle 9ias Release 2 for a development group. I followed the steps outlined in NOTe:167960.1 using both EM Website (creating a OC4J and editing server.xml and defau*.xml files) and DCMCTL (Doc ID: 185635.1) utility. OC4J app is coming up only partially which does not work.
    Is this possible to "Setup a JSP to Run on Different Physical Location than OC4J Default Home" in Oracle 9ias Release 2 ?
    Appreciate insight
    Thanks
    Subu

    I was finally able to get it up and running... I commented out all the apple specific lines in smb.conf until I was able to successfully finish the driver copy process via the Windows driver wizard. The line in the /etc/smb.conf which was causing this weird problem was:
         vfs objects = notify_kqueue,darwinacl,darwin_streams
    I have no idea what this line is about. However after commenting it out the driver installation immediately started to work. I cross checked it by adding the line again and viola the problem was back - so it can be broken down to this line...
    As I've found some other comments to this line in the internet I guess I will go for the smb.conf changes described in this article:
    http://blog.djmnet.org/2009/02/09/macs-needing-unix-network-geekery/
    Cheers
    jogi4mac

  • You are signed in with a different Apple ID than previously used with Podcasts. Do you want to sync these podcast subscriptions and stations with "******"?

    Why am I getting this error message every time I open iTunes? I'm giving the option of Sync or don't Sync and click sync and there are no problems. But why does it open with: You are signed in with a different Apple ID than previously used with Podcasts. Do you want to sync these podcast subscriptions and stations with “*****”?
    <Edited by Host>

    Please sign out of the iTunes Store by selecting
              Store ▹ Sign Out
    from the iTunes menu bar. Then sign back in.

Maybe you are looking for

  • Print to LaserJet 3150 Shared by Windows XP Pro

    I have an older, but servicable LaserJet 3150 hooked to my Windows XP Pro desktop at work. A long time ago, I set it up to share with OS X by creatign a virtual printer using GhostScript and some other queuing utility - this made is look like a PostS

  • SO FRUSTRATING PLEASE HELP!!

    OK, so I'm new to Apple, I just received my MacBook, and am attempting to type a simple essay for class tomorrow. I am using iPages, set a blank template, and have typed about a paragraph, but now I cannot see the rest of what I am typing. It seems t

  • Compile-time warning during javac of a Class that implements Comparable

    Hello All, I have defined a class as follows; public class CardTiles extends JButton implements Comparable{ During normal compilation with javac, it tell me to use Xlint to compile and the warning it throws is below: CardTiles.java:4: warning: [seria

  • Db verify utility help

    Hi how to use dbv utility for all the files in the database at a time. Edited by: user10893424 on Jun 29, 2009 2:45 AM

  • Please send me select statement for the below query.....

    FOR i IN 1..9 LOOP IF shift(i) IS NULL THEN FOR y IN i+1..9 LOOP IF shift(y) IS NOT NULL THEN shift(i) := shift(y); shift(y) := NULL; EXIT; END IF; END LOOP; END IF; END LOOP; please how to write select query to replace loops in above code