Fastest way to SELECT different people, same date of birth, same ZIP (postal code)

I have a pretty large table of people over 25 M records. There NAME, ADDRESS, DOB, ZIP, OTHER, etc.

Ago total of about 9 M people separate for one person it might be more then a recording (that is, change of address, name, etc.)

I want to choose the DISTINCT people born on the same date and in the same ZIP (postal) code. You are looking for the most effective way to do it.

Any idea is welcome

Hello

Here's one way:

WITH got_cnt AS

(

SELECT person_id, person_name, address, date of birth, zip - or other columns of your choice

, COUNT (DISTINCT person_id) over (PARTITION BY dob, zip) AS cnt

FROM table_x

)

SELECT *.

OF got_cnt

WHERE cnt > 1

ORDER BY dob, zip

;

It will be faster than other methods because it requires only 1 pass through the table.

Tags: Database

Similar Questions

  • Is there a no work around to self-selecting shipping options by entering the zip/postal code?

    Is there a no work around to self-selecting shipping options by entering the zip/postal code? Because currently, yet the user must select the delivery option (radio button type).

    Yes, but its coding custom in conjunction with a 3rd party to search for postal code. You also manage the boring dom manipulation that BC with its code on things like the fields of code reduction, changes etc. making your shipping option code. You really need to have a good understanding of encoding AND British Colombia in this case unfortunately.

    Possible, but if you do not want to pay so that it can be done or not be able to do it yourself - Best to avoid it, if you can on the project.

  • (Redirected) Format of date of birth

    Hello. I am trying to create a profile for my account of SFR and I can't seem to step 2, which is where I have to enter my date of birth and zip code. I get an error telling me that my date of birth is incorrect. What is the correct format for the date of birth?

    Better to post this thread in the Customer Care Forum here:

    http://en.community.Dell.com/support-forums/customercare/f/4674.aspx

    Bev.

  • Different people I have the same address.

    I have a table with columns ADDRESS DISPLAY_NAME, Startdate, Enddate, and ACCOUNT. I need sql to find different people living at the same address. Someone help me please. Thank you.

    Hello

    Welcome to the forum!

    Use the COUNT function to see how many times an ioccurs from the given address and displays only those of a COUNT > 1.
    You can use the COUNT aggregation function or the analytical COUNT function, like this:

    WITH     got_address_cnt     AS
    (
         SELECT     x.*     -- Or list whatever columns you need
         ,     COUNT (*) OVER (PARTITION BY addrress)     AS address_cnt
         FROM     table_x   x
    )
    SELECT       *
    FROM       got_address_cnt
    WHERE       address_cnt     > 1
    ORDER BY  address
    ;
    

    I hope that answers your question.
    If not, post a small example data (CREATE TABLE and only relevant columns, INSERT statements) and also publish outcomes from these data.
    It's a good idea to do so whenever you have a problem. It allows you to specify exactly what the problem is and allows people to test their ideas.

    Always tell what version of Oracle you are using. The above query will work in Oracle 9 (and), but can be changed to run in Oracle 8.1.

  • An effective way to select dynamic data signals

    Is there a better way to select certain combinations of dynamic data from splitting signals the signals and checking them with a case statement and then merge the signals back up?

    The express vi "Select signals" of the range of manipulation of signals seem to works, but it is only good for a predefined set of signals. I want the user to be able to show easily, which indicates that they want.

    Thank you for your comments and suggestions.

    The Express VI select signals has a "Input Selector" where you can plug you want to select by program. Take a look at the example of 'Select signals' which comes with LabVIEW.

  • Two different people that have Dreamweaver installed CS6 can be changed to the same Web site?

    AS the title says, I'm trying to understand if it is possible for two different people to make the changes on the site even if CS6 is installed on BOTH computers.

    Sure.

    There is even a feature of DW integrated fund which makes so that they don't accidentally edit the same file at the same time.

    I've never used it so I can't vouch for it, but I know it's there.

    Basically the site files would be stored on a file server and you check the files to make changes. While a person working on a file, it is not available to the other person so that you do not accidentally cross to the top of your changes.

  • Is there a way to change the duration of a group of clips selected at the same time?

    Hi all

    I work with the good old first 6 on Windows 7.

    Is there a way to change the duration of a group of clips selected at the same time?  If I have a large group of items my editing which are all the same length, once I chose them all in a group, can I change somehow the term chassis number from all the clips at the same time?

    I found other things that can be done to a group of clips at the same time, but I can't find a way to change the duration of a group of selected items.

    Thank you

    Digi

    This feature did not show up to CS5.  With any version prior to that, you can them one at a time.

  • The fastest way to transfer files between servers...

    I have a question regarding what would be the best option to accelerate the transfer of files between 2 servers to our VMware environment. We plan to spend our GroupWise email from netware to windows and upgrade to Groupwise (v7 to v8) at the same time. We will anticipate moving about ~ 125 gigabytes of data (files ~ 517 000) and expect that it will take several hours. We would like to minimize this time better we can so we wonder what would be the best configuration of things to get there? Two virtual machines on the same host? Two virtual machines on the data store even? On different hosts, or data warehouses? Our configurations are listed below:

    -In the course of running vSphere 4.1 ESXi

    -Data stored on 2 Dell Equalogic 5500 without

    -SAN one in each of the 2 sites, physically about 3 miles away

    -3 guests, 2 to a location and 1 in the other (same places the San)

    -Transfer of data from Netware 6.5 source, destination will be Windows 2008 R2 DataCenter

    -Links gigabit between all the elements of our VMware environment, including the link between the sites (on optical fiber).

    -3 guests are able to run all our virtual machines without overloading, so if we go to the virtual computer to another host, it is not a problem.

    We would like to know what is the best way to put everything in place for the transfer, so that we can prepare before hand. Any suggestions?

    Thanks in advance.

    Well, the fastest way would be to offload the clone/copy to the San operation. If your configuration supports VAAI then the clone would happen completely on the SAN by assuming that the source and destination storage device is the same SAN. Would it be different San then the network factors in anything. For what is running on the same host, which would be beneficial for cloning a virtual machine (mainly memory footprint) should not take place on the network.

    I hope this helps!

  • What is the best way to select multiple tracks?

    So, imagine that you have a sequence like this:

    Unselected.png

    And you want to accomplish the following selection:

    Selected.png

    What is the best way to do that has no shift + selection 12 times? I had FCP where I could click the top left and then shift + click on the lower right and get a selection of range in this way. But obviously it works differently in first. If I wanted to include A5 - 7 in the selection, I could do just a selection rectangle, but someone at - it a convenient way to select several clips landlocked like that?

    The fastest way I can think to do is to temporarily make the slightly shorter left selected top clip so that it has an ATM next to him, then use your mouse to drag and drop around all clips. You must again extend the left top clip again after the fact. Alternatively, you could catch the entire section, then shift select the ones that you don't need. In addition, shift-make drag a marquee selection that includes selected clips deselects them.

    See: work with items in a Premiere Pro sequence

  • Best way to display a set of data rows (15 + columns)?

    Hey,.

    I have a set of data rows in a data from a JAVA call control. Rowset contains about 15 + columns of data that I need to display to the user in a grid. What is the best way to achieve this? When I try to drag the control of data lines in the AMX only obvious choice page seems to be seen list but I can't just use some columns in a list view. Or an iterator. I guess I should use iterator somehow, but what is the best way to present this data?

    Manually, you can go and edit the list to add more columns and place fields in them.

    Check out the application workbetter to see some models list (for example, people discovered) sample.

    Oracle Mobile Application Framework samples

    You might want to rethink your design and have a limited set of fields appear in the list, and then when you select a list item data show the rest of the info.

    a very large list is perhaps not ideal for a mobile screen.

  • the fastest way to load an XML file

    What is the fastest way to generate an xsd-based oracle table and then load data from a file that conforms to the xml document in the xsd.

    I would do something like this:

    SQL > insert into tmp_xml

    2 values)

    3 xmltype (bfilename('TEST_DIR','test.xml'), nls_charset_id ('AL32UTF8'))

    4  );

    1 row inserted

    SQL >

    SQL > select x1.col_a, x1.col_b, x1.col_c, x2.*

    tmp_xml 2 t

    3, xmltable)

    4 "/ parent/Child1.

    5 passage t.object_value

    path of 6 columns col_a varchar2 (10) '@ColumnA '.

    7 road of varchar2 (10) col_b '@ColumnB '.

    8 road of varchar2 (10) col_c '@ColumnC '.

    9, child2 xmltype path "Child2".

    (10) x 1

    11, xmltable)

    12 ' / Child2'

    13 passage x1.child2

    path of 14 columns col_d varchar2 (10) 'ColonneD '.

    15 road of varchar2 (10) col_e "child3/column.

    16, road of varchar2 (10) col_f "child3/ColumnF.

    17 road of varchar2 (10) col_g "child3/column".

    18 road of varchar2 (10) col_h "child3/ColumnH.

    19 road to varchar2 (10) col_i 'ColumnI.

    (20) x 2

    21;

    COL_A, COL_B, COL_C COL_D COL_E COL_F COL_G COL_H COL_I

    ---------- ---------- ---------- ---------- ---------- ---------- ---------- ---------- ----------

    CAF ClientID ClientName 20130121 D 20752,19 AUD

    FCA ClientID ClientName M 20130121 235.39 bla Blahdeblah AUD

    (you can adjust data types as needed)

  • The fastest way to the files and folder to move

    I'm moving a lot of files to another drive and it takes a long time.   I do travel in the LR library now and an alternative is to move outside of the LR and use the catalog import option to add (don't know if it's a more quickly).

    You can select multiple folders in the LR library to move to the same location or do you need to do one at a time? This would be onen advantage to do outside of LR.

    Any thoughts?

    You cannot move several files in Lightroom.

    The fastest way is to move your "Pictures" folder all OS, then re - link in Lightroom by right-clicking and choosing 'find the missing folder '.

    If you need to move several subfolders selectively, then there is no quick way. You move quickly in the BONES and then go rebinding in Lightroom or move them slowly one by one in Lightroom.

  • Calculate the fastest path between 2 nodes with the data model for the Oracle network

    Hi all,

    I have Oracle 10 g 2.

    My problem is the following:

    I created a network named ITALIA_NET in the data model for the Oracle network.
    The table of links of this network is named: ITALIA_NET_LINK$.
    The table of the nodes of this network is named: ITALIA_NET_NODE$.

    The table ITALIA_NET_LINK$ contains a field named COST that contains links (in meters) lengths.

    I've already calculated the SHORTEST PATH between two nodes of the network, by using the method of shortestPath() (using the Java API) as shown on "Pro Oracle Spatial for Oracle Database 11 g" manual. Infact, this method makes reference to the COST field for $ ITALIA_NET_LINK to make this calculation.

    Now, I want to calculate the FASTER PATH between two nodes of the network. I have the links (in hours) travel time to make this calculation.

    My idea is to create a new field in ITALIA_NET_LINK$ named Cost2 containing the travel time from the links and then do the math by using the shorthestPath() method, referring to the Cost2 field to $ ITALIA_NET_LINK COST field instead.
    By default, I know that the shorthestPath() method returns the COST field for $ ITALIA_NET_LINK. Is possible to change this setting and do that this method refers to the Cost2 field?

    In the alternative, is another way for the calculation of the fastest way?
    I want to leave the creation of another network as last solution, because I will have other costs of field (Cost3, cos4t,...)

    Thank you much in advance.

    Your approach is good. You will have two networks and you can read them in memory and analyze of shortest path. The shortestPath method is static for the class of NetworkManager. You can use the same method for both networks, once they are read into memory.

    ...
    read the network with time as cost of link
    NetTime network = NetworkManager.readNetwork (dbConnection, 'ITALIA_NET_TIME');
    read the network length as cost of link
    Network netLength = NetworkManager.readNetwork (dbConnection, 'ITALIA_NET_LENGTH');

    calculate the quickest way
    PathTime path = NetworkManager.shortestPath (netTime, startNodeID, endNodeID);
    calculate the shortest path
    PathLength path = NetworkManager.shortestPath (netLength, startNodeID, endNodeID);
    ...

    In the future, if you upgrade to 11g, network data model provides a load on demand (LOD) API that loads only the scores of necessary network in memory during the analysis. This command removes the restriction of the memory of the 10g (in memory API you use) API. API of LOD can handle very large networks and offers more features analysis and modeling capabilities.

    The following link contains the tutorial of NDM LOD API ready for download. Just for your information.
    https://spatial.SampleCode.Oracle.com/servlets/ProjectProcess?PageID=0Zl7oV

    Kind regards
    Jack

  • iMessage is combinging 2 different people in a conversation

    On my iPhone 6, iMessage is combining 2 different people in a conversation. How can I separate the conversations of these 2 different people?

    Hello

    Separate on their address in the Contacts application cards.

    If they use the same Apple ID (or have them connected together) they need the separate.

    Even if they tied their number of iPhone.

    20:44 Tuesday; April 19, 2016

     iMac 2.5 Ghz i5 2011 (El Capitan)
     G4/1GhzDual MDD (Leopard 10.5.8)
     MacBookPro (Snow Leopard 10.6.8) 2 GB
     Mac OS X (10.6.8).
     iPhone and iPad (2)

  • Is there a way to select an area of some of the elements of a csv file and read in LabVIEW?

    Hello everyone, I was wondering if there was a way to select only a certain "box" of the elements of a .csv file in LabVIEW? I have LabVIEW 2011 and my main goal is to take two tables and graphs against each other. I can import the .csv perfectly and separate each line and each column to be his own, but I have a 8 X 8 but want graphic in the middle of 4 X 5 or something like that. Is it possible to extract a table without starting at the beginning and end in the end? Thank you in advance.

    Hi Szklanam,

    as a CSV file is a TXT file with a different suffix, you can read a number of lines in this file. For example, you can limit the number of rows in your table of resultung. To limit the number of columns, you must always use an ArraySubset, so maybe it is much easier to read the complete CSV file and select interesting places with ArraySubset...

Maybe you are looking for

  • Favorites sync is no longer between devices

    Hello My Favorites no longer stay in sync between my Imac, Macbook, Iphone and iPad. They used to. How to sync again? Thank you Ted

  • RN4220 and the FOURTH all losses of data for TWO years

    Hello team NTGR and customers. I want to tell you a failstory. Two years ago, I was looking for a BIG SIN store backups of my data from the company. I have already had several old Pro RND 6 boxes and selected 4220 x 12 4 hard drives of WD RE CT. pric

  • HP Pavilion - the best way to optimize?

    SYSTEM INFORMATION: Pavilion PU131AV / a1050y, Windows XP SP3 32-bit, Nvidia GeForce 6600, MCE, Intel Pentium 4 CPU 3.20 GHz, 2 GB RAM PROBLEM: Office seems to have problems running the basic operations.  For example: a. when copying large amounts of

  • PC TURNS OFF WHEN I START A DOWNLOAD

    WHENEVER I TRY TO DOWNLOAD SOME TIME A CLICK RUN VISTA STOPS. IT IS SO FRAUTRATING BECAUSE I CAN NOT DOWNLOAD ANY PROGRAMS PLEASE HELP

  • HowTo send the browser to the background (ApplicationMenuItem)

    I have the following scenario: Application screen A, x --> called a browser with the URL session where an image is displayed works well Request A, x screen adds an ApplicationMenuItem in the browser to make it easy to open some other URL with other i