Counting Numnber of Cells in a Table that Have the Same Value

Is there a way/formula to do this, other than they way I'm doing it now, which is by using COUNTIF? In a table with 1000 rows for instance, let's say the values in the A column are what I'm keying off. I would like a count of all the cells in the A column that have the word "example" as their value. Right now for each unique value in a cell in the A column I am manually creating a COUNTIF(A1:A1000,"<value i'm matching against>) but if there are many unique values in the A column, it's quite laborious. Ideally I'd like to just have a table generated that gives me the top 5 or top 10 most occurring cell values in the A column in the table. What's the best way to do this?

So for instance, for a column like this:
1
1
1
2
2
4
5
I want a way to get back the number of times 1 appears in the list (3), the number of times 2 appears in the list (2), 4 (1), 5 (1), and so on. If I do a COUNTIF and there are thousands of rows, I have to manually put the matching string in each one.

Similar Messages

  • Can I create a view based on two tables that have the same column name?

    I have two tables A and B. Each table has 50+ columns.
    I want to create a view that includes all the columns in A and all the columns in B. I created a view with a select statement that says
    Select A.*, B.*
    From A, B
    where A.id = B.id
    It returns an error because in each table I have a column that keeps track if a record has been changed called Modified_By. That's where it chokes up on I figure. I would like to write the view without explicitly writing each column name from A and B as part of the select statement. The actual select statement works fine and only bombs when trying to turn the select statement into a view.

    You will have to type the full column list at least once. You can save a few keystrokes (i.e. alias. on every column) by providing the column names to the CREATE part instead of in the SELECT part. Something like:
    SQL> desc t
    Name                                      Null?    Type
    ID                                                 NUMBER
    NAME                                               VARCHAR2(10)
    SQL> desc t1
    Name                                      Null?    Type
    T_ID                                               NUMBER
    LOC_ID                                             NUMBER
    NAME                                               VARCHAR2(15)
    SQL> CREATE VIEW t_v (id, t_name, t_id, loc_id, t1_name) AS
      2  SELECT t.*, t1.*
      3  FROM t, t1
      4  WHERE t.id = t1.t_id;
    View created.HTH
    John

  • Query for retreiving table names that have the same data

    Hi,
    Does anybody know how to retreive all the table names that have the same data in their respective tables but i dont know the table names or its fields. Is there any possible query to perform this action???
    Thanks in Advance,
    Balaji.

    What about...
    WITH manager_list AS
    SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id
      AND   m.name = :P_MANAGER)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    ), all_list AS
    SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    SELECT a.*
    FROM   manager_list m,
           all_list a
    WHERE  m.employees = a.employeesWould be easier in 11g, but I don't have an installation here so this is based on 10g.
    Cheers
    Ben

  • Ever since installing iCloud and Lion my computer is slow or freezes.  The color wheel comes on and My work stops.  I have only a small window of time where my computers will function normally during the day. I know many others that have the same problem.

    Ever since installing iCloud and Lion my computer is slow or freezes.  The color wheel comes on and My work stops.  I have only a small window of time where my computers will function normally during the day. I know many others that have the same problem. I'll get 20-30 minutes of work done and then a sync or something comes on, the color wheel of death shows up, and my productivity is shot.  I have to shut the computer down the hard way!  when it comes back up, it is still either frozen or slow.  I've checked in at the genius bar and all they say is that there have been some problems that Apple is trying to fix.  It effects Mail, Contacts, Safari, Calendar....yeah, pretty much everything.  My iPhone and iPad are not effected as much so I end up doing what I can with them.  I've seen the blogs out there and understand that many have the same problem.  I have been waiting to read about a fix but I have found nothing!  Any ideas?

    Not enough free space on the startup disk can slow the system down.
    Right or control click the MacintoshHD icon. Click Get Info. In the Get Info window you will see Capacity and Available. Make sure there's a minimum of 15% free disk space.
    For startup issues...  open System Preferences > Users & Groups - Login Items. Delete any apps listed there then restart your mac.
    And disable the Lion "resume" feature.
    Open System Preferences > General
    Deselect:   Restore windows when quitting and re-opening apps
    And Spotlight may be indexing... you can turn that off > Turning Off Spotlight | Mac Tricks And Tips

  • What is the registry key in Adobe Acrobat v9 which turns the dialog off: any form fields that have the same name in the merged documents are now...

    what is the registry key in Adobe Acrobat v9 which turns the dialog off: any form fields that have the same name in the merged documents are now...

    There is no key because that is an important dialog.  Why would you want it to go away?

  • Aperture replaces images with other images that have the same image number

    Help! Aperture has started replacing images in recent projects with older images from elsewhere on my hard drive that have the same image number. Obviously I need a better numbering system, but can someone help me figure out why this is happening? I store master files on an external drive and the "replacement" files seem to be coming from identically named images on my local HD or in iPhoto.

    I started renaming all of my images when I import them. I'm using referenced images to an external drive, although I still have a bunch of older images stored in the Aperture library under my old numbering system (which was basically whatever image number the camera generated)....need to move them all to the external drive but haven't had time.
    So here's the latest problem: Today, Aperture started replacing images in albums (referenced images with unique file names under my new system) with old images even though the file names weren't even remotely close. It also replaced the images with the preview for the old image (230 pixels wide). "Show master" showed me the preview for the old image, not the correct image.
    I tried forcing an update to the preview, but it had no effect. The real masters are intact on the external drive, but this is really scaring me. It happens out of the blue, right in front of me...I watch as my images appear to be replaced with random old images in Aperture. It appears to have nothing to do with file names, as I'm now using totally unique file names.

  • CV04N-Searching across multiple classes that have the same characteristics

    In CV04N- is there a way to search across mutliple classes that have the same characteristics?
    For example I created 3 new class types each assinged to a new class, each class having the same characteristics.
    Say if I have a characterisitics called Contract Name.  I need to be able to search for a contract name across all 3 classes.
    The search results in CV04N defaults to class type 017 so it only shows characterisitcs relate to that type, Is there a way to get the characteristics for the new created class types to show?
    I know in CV04N you can only search one class type and class at a time.
    Does anyone know of a way to fulfill these requirements, without creating a customized report?

    Hi Jenny,
    The answer for this question is that:
    1. The class 017 document management in cv 04n is SAP standard class .It's totally different than the new class created by you.
    2. The new class in CL02 you are creating is for a perticular document type. When you assign a characteristic (contract name) to this new class ,it appears in additional data field as contract name.
    3. Now you can make a search with only Contract name filed and the report will be displayed with all document types having this characteristic (Contract name) is assigned. Thus you can find the classes(document types)thru characteristic(contract name).
    I hope this will resolve the query. And you will get clarified between two classes( i.e. 017 and new classes in DMS).You can say them as subclassed under 017 class.
    Regards,
    Ravindra

  • Why can't I send messages to my friends that have the same thing as me?  t

    Why can't I send messages to my friends that have the same thing as me? They can send to me. It says that they aren't registered and they are though.

    What phone do you have?  And how, exactly, are you trying to send pictures to Facebook?  It sounds like you need to log into Facebook on the phone or re-enter your username and password for Facebook.  Somehow the connection between your photos and Facebook has been lost, and you need to get them connected again (verify your login information)

  • How to import images that have the same name as images already imported

    I am trying to import images into LR3.  I have a number of images with duplicate names.  Some of them are duplicate images that I simply have stored in different directories and some are images that are not duplicates but have the same name.  LR3 refuses to import any images that has the name of an image that has already been imported.  Is there anything I can do about this.  If not, it kind of makes the softwares useless to me.
    In hopes of a solution . . .
    --Kenoli

    Thanks.  I'm sure making sure all file names are discrete makes sense.  I guess I need to find some kind of bulk re-name utility. 
    Additionally, I am dealing with a very large set of unorganized images and one of the uses I would like to put LR3 to is to organize the images into directories and get rid of duplicates while inspecting them to make sure that I don't trash differing images with the same names.  One of the challenges is identifying these images so I can re-name them.
    I have been working with Apple's Aperture, which doesn't rely simply on the name to identify images since it uses a more complicated algorithm to differentiate images from each other.  It is one thing I really like about Aperture.  What I like about LR3 is that it lets me use actually file directories to store images rather than moving them into its own file system like Aperture does.  I don't like having files locked into a system that is software dependent.
    Also, I finally found the checkbox that tells LR to import "duplicates."  I couldn't find it before.  I don't find LR3 as intuitive as I'd like.  I've always had to spend more time figuring out how Adobe software does things than I would like. I've had little luck with Adobe's support site, aside from this forum.
    Thanks for you helpful suggestions.
    --Kenoli

  • Stuck on sql query to find parent records that have the same child records

    Oracle 10gR2 Enterprise Edition.
    Hi,
    I'm trying to write some logic to look for records in a parent table, which have the exact same values in a child table.
    This is part of a bigger query, but I'm stuck on this part for now, so I've mocked up some simplified tables below to capture the core of the
    problem I'm stuck on.
    Let say I've got a parent table Manager, a child table Employee and there's a many to many relationship between them.
    The aptly named Join_Table handles the relationship between them. So one manager can manage many employees, one employee can be managed by
    many managers.
    I've a feeling this is stupidly easy, but I seem to be suffering from a bad bout of brain freeze today!
    -- parent table
    CREATE TABLE manager (
    id      number primary key,
    name      varchar2(100));
    -- child table
    CREATE TABLE employee (
    id          number primary key,
    name      varchar2(100));
    -- link table
    CREATE TABLE join_table (
    manager_id          NUMBER,
    employee_id      NUMBER,
    CONSTRAINT join_table_pk PRIMARY KEY (manager_id, employee_id),
    CONSTRAINT manager_fk FOREIGN KEY (manager_id) REFERENCES manager(id),
    CONSTRAINT employee_fk FOREIGN KEY (employee_id) REFERENCES employee(id)
    -- Insert some managers
    INSERT INTO manager (id, name) VALUES (1, 'John');
    INSERT INTO manager (id, name) VALUES (2, 'Bob');
    INSERT INTO manager (id, name) VALUES (3, 'Mary');
    INSERT INTO manager (id, name) VALUES (4, 'Sue');
    INSERT INTO manager (id, name) VALUES (5, 'Alan');
    INSERT INTO manager (id, name) VALUES (6, 'Mike');
    -- Insert some employees
    INSERT INTO employee (id, name) VALUES (101, 'Paul');
    INSERT INTO employee (id, name) VALUES (102, 'Simon');
    INSERT INTO employee (id, name) VALUES (103, 'Ken');
    INSERT INTO employee (id, name) VALUES (104, 'Kevin');
    INSERT INTO employee (id, name) VALUES (105, 'Jack');
    INSERT INTO employee (id, name) VALUES (106, 'Jennifer');
    INSERT INTO employee (id, name) VALUES (107, 'Tim');
    -- Insert the links
    -- John manages Paul, Simon, Ken
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (1, 103);
    -- Bob manages Paul, Simon, Kevin, Jack
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 104);
    INSERT INTO join_table (manager_id, employee_id) VALUES (2, 105);
    -- Mary manages Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (3, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (3, 107);
    -- Sue manages Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (4, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (4, 107);
    -- Alan manages Paul, Simon, Ken, Jennifer, Tim
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 103);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 106);
    INSERT INTO join_table (manager_id, employee_id) VALUES (5, 107);
    -- Mike manages Paul, Simon, Ken
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 101);
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 102);
    INSERT INTO join_table (manager_id, employee_id) VALUES (6, 103);
    -- For sanity
    CREATE UNIQUE INDEX employee_name_uidx ON employee(name);So if I'm querying for manager John, I want to find the other managers who manage the exact same list of employees.
    Answer should be Mike.
    If I'm querying for manager Mary, answer should be Sue.
    This query will give me the list of managers who manage some of the same employees as John, but not the exact same employees...
    SELECT DISTINCT m.name AS manager
    FROM manager m, join_table jt, employee e
    WHERE m.id = jt.manager_id
    AND jt.employee_id = e.id
    AND e.id IN (
         SELECT e.id
         FROM manager m, join_table jt, employee e
         WHERE m.id = jt.manager_id
         AND jt.employee_id = e.id
         AND m.name = 'John')
    ORDER BY 1;I thought about using set operations to find managers whose list of employees minus my employees is null and where my employees minus their list of employees is null. But surely there's a simpler more elegant way.
    Any ideas?
    Btw, I need to run this as a batch job against tables with >20 million rows so query efficiency is key.

    What about...
    WITH manager_list AS
    SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id
      AND   m.name = :P_MANAGER)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    ), all_list AS
    SELECT name,
            LTRIM(MAX(SYS_CONNECT_BY_PATH(id,','))
            KEEP (DENSE_RANK LAST ORDER BY curr),',') AS employees
    FROM   (SELECT m.name,
                    e.id,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) AS curr,
                    ROW_NUMBER() OVER (PARTITION BY m.name ORDER BY e.id) -1 AS prev
             FROM   manager m,
                    join_table jt,
                    employee e
      WHERE m.id           = jt.manager_id
      AND   jt.employee_id = e.id)
      GROUP BY name
      CONNECT BY prev = PRIOR curr AND name = PRIOR name
      START WITH curr = 1
    SELECT a.*
    FROM   manager_list m,
           all_list a
    WHERE  m.employees = a.employeesWould be easier in 11g, but I don't have an installation here so this is based on 10g.
    Cheers
    Ben

  • Tables that store the "Personalization" values in Demantra CWB

    Hi All,
    Can some tell me, which tables stores the basic "personalize information" on CWB Demantra.Like i am looking for tables that stores "MY worksheets" information in the home page of CWB.
    Thanks,

    as far as i know...we dont have any table to show the below requirement
    "Like i am looking for tables that stores "MY worksheets" information in the home page of CWB."
    you can only view the list of available worksheets in queries table

  • Hi friends, I have a doubt in inserting a field to database table and inserting the same values in two different tables

    I have a mpp screen for a cd library management system (we are practicing on it).
    We have a main screen where a user should enter the enteries and while clicking a add button it should be inserted in a table, Here the problem rises the table name are ztransaction and zstatus.The fields in mpp are cdid,customerid,transaction id,date of issue and duedate.Now after entering all the values on clicking add button it should be inserted to database table ztransaction and the field cdid alone should be inserted both in ztransaction and zstatus.
    Thank you

    Hi Raghuram R G,
    Check for Primary key and foreign key in the Database table??? Because of this it was not inserting...check and confirm??
    Regds,
    Vijay SR

  • How to get Mail to separate 2 threads that have the same subject

    I'm using Mail to view my IMAP account (Gmail).
    "Organize by Thread" works, but it seems to be based only on subject, so old conversations started with the same subject as a new conversation show up together in the same thread.
    This is particularly annoying for messages with no subject - there are hundreds of them all in the same thread.
    Is there some way to tell Mail that a certain message is the start of a new thread?

    Separating threaded messages into multiple threads, or combining messages into one thread, is defined in IAB [Internet Activities Board] Official Protocol Standards Network Working Group RFC [Request for Comments] 2822, proposed as a change to standard STD 11. Basically, the "References:" message header would be used for this purpose, as it would contain the unique message id's of all the precursor messages. See RFC 2822 at http://www.rfc-editor.org/rfc/rfc2822.txt for specific information. The current STD 11 has no detailed definition of the contents of this header.
    Of course, email clients, including but not limited to Apple's 'Mail', must insert this optional header, properly populate it, and properly interpret it for threads to be defined in this way. However, it should be possible for the recipient's email client to insert and build or modify this header, with user guidance, so that conversational threads not originally identified can be documented or augmented. Valid arguments against changing existing headers should not really apply to the situation where the headers do not exist or where a reference is missing. These "Reference:" headers are in service to the users, not the network.
    As stated, this is a proposed use of an optional header, and rules are advisory rather than mandatory. but definition of multiple parent emails at any point in the conversation is strongly advised against. Logical rules for identifying the thread break down if the chain of precursors forks when looking backward.
    The above may explain Apple's mention of using headers to define threads, but the capability does not seem to have been implemented. How do we encourage Apple to move on this?

  • Iphoto seems to be deleting old (several years old) images that hav the same name as new images being loaded. how can i fix this?

    I was browsing some old photos in iPhoto11 and started getting 'image not found' errors. After much investigation, rebuilding thumbnails and extracting photos using fatface iphoto library manager it seems that newer photos with the same name as very old photos (Canon camera naming scheme IMG_nnnn.jpg) have caused the old photos to be deleted? I thought iphoto handled this situation but it seems not.
    I never got any error or warning messages on importing the newer photos. Naturally the old ones have been in there for years and were originally imported using older versions of iphoto.
    As it happens I do have all these old photos stored elsewhere so its not a case of panicking but I could do with a solution going forwards.
    Has anyone else encountered this (and of course if so how did you resolve it?)
    TIA
    Paul

    Every new import to iPhoto goes into a new folder on the HD, so no, iPhoto doesn't overwrite older images with the same filename.
    Are you running a Managed or a Referenced Library?
    A Managed Library, is the default setting, and iPhoto copies files into the iPhoto Library when Importing. The files are then stored in the Library package
    A Referenced Library is when iPhoto is NOT copying the files into the iPhoto Library when importing because you made a change at iPhoto -> Preferences -> Advanced. (You unchecked the option to copy files into the Library on import) The files are then stored where ever you put them and not in the Library package. In this scenario you are responsible for the File Management. 

  • If I have 2 computers at home that have the same itunes account on them, but have different songs on each, can I consolidate the songs to one computer so I can get rid of the older computer?

    I have 2 computers that have downloaded songs from the same itunes account. How can I get all the music on 1 computer so I can get rid of the other?

    make sure you have the new itunes go to the store then it will say purchesd and there after you click it, it will show everything you have ever bought on itunes and you can redownload all your music and anything you bought from there hope this helps

Maybe you are looking for