Different people living in same address same Account

I have Display_name, Address,Account and few other columns in a table. I need people(Display_name) at the same Address with the same account number and a different name (Display_name). For example wife and husband living at the same address and account number.
Please give me some idea with the sql. Thank you.

Hi,
This sounds like a job for the COUNT function:
WITH     got_cnt       AS
     SELECT  display_name          -- or whatever columns you want
     ,     COUNT (DISTINCT display_name) OVER ( PARTITION BY  address
                                                     ,                    account
                                        ) AS display_name_cnt
     FROM    a_table
SELECT  display_name          -- or whatever columns you want
FROM     got_cnt
WHERE     display_name_cnt     > 1
;Analytic functions are computed after the WHERE clause is appled. To use the results of an analytic function in a WHERE clause, we have to compute the function in a sub-query, then we can use that value in the WHERE clause (or anywhere else) of the parent query,.
I hope this answers your question.
If not, post a little sample data (CREATE TABLE and INSERT statements, relevant columns only), and also post the results you want from that data.
Explain, using specific examples, how you get those results from that data.
Always say which version of Oracle you're using.
Edited by: Frank Kulash on Feb 1, 2011 10:54 AM

Similar Messages

  • We have 3 devices used by 3 different people under the same Apple ID, how do I stop getting my daughters texts, both sent and received?

    We have 3 devices used by 3 different people under the same Apple ID, how do I stop receiving my daughters texts? Both sent and received.

    When you use the same Apple ID on 3 devices it means you are all using the same (email, imessaging, calendar etc).  Since iCloud (MobileMe) is designed to be shared across all devices included Macs, it means all devices setup with the same ID will have access to the information.
    Text messaging is relevant only to the number you are texting.  This is done through your telecom companys lines and not on Apples.
    If you do not want to have others be able to read any of your information then it is best you each have your own account.

  • Mail sorting messages from different people in the same thread?

    I have this weird issue. It's happened before but I figured I might be able to figure this out.
    I got a response from somebody this morning and whats happening is, when I click on his response, the email shows up on the right like it should. However, ths email is from "Floyd" and shows as email "2". It shows another email below it in the "thread" from "Taryn" and has absolutely nothing to do with this email. The only similarities are the subject line which says "Poster". The "First" email from Taryn is from April. It seams as if it's sorting the emails by subject line. I don't want emails from different people in the same thread. Any thoughts on how to fix this issue? Image attached.
    OSX 10.8.4

    This question is about the same as mine.  I migrated all my data from old mac mini to new mac mini.  System screwed up and permission and owners were not setup.  Now I'm trying to salvage this mess.  I'm also trying to import mail, which I think should be on the computer but I don't know where.
    Same question where does the computer store Mail mail?
    Chuck

  • HT204380 Can you FaceTime two different people at the same time?

    Can you FaceTime two different people at the same time?

    No, not at this time. Feedback to Apple goes HERE, and click on the appropriate section.

  • Is it possible to face time with 3 different people at the same time?

    Is it possible to face time with 3 different people at the same time?

    Check out GoToMeeting http://tinyurl.com/k6q84kw
     Cheers, Tom

  • Can u access 2 Candy crush games for 2 different people from the same iPad?

    can u access 2 candy crush games for  2 different people using ipad2?

    I think there is a contradiction in your requirements. You want two people to share an account and you don't want either to interfere with the other.
    The short and simple answer is to use IMAP to connect to the mail server. If your current email provider doesn't offer IMAP, find another that does. This is old technology already and it's disgraceful that some email providers haven't yet put it in place.
    IMAP means that your messages are stored on the server and both of you will see exactly the same set of messages. And therein lies the contradiction; you will both see changes made by the other so you are inherently interfering with one another.
    Caveats: some providers may not permit you both to access the account concurrently, and even if they do, things may become interesting if you both choose to work on the same message simultaneously.
    Note that all of this is about email servers and protocols; your choice of Thunderbird as your email client has little bearing on the situation.

  • HT3819 How can I transfer songs from my ITunes account to my daughter's who has a different Apple ID but same account info?

    How can I transfer songs from my iTunes account to my daughter's, who has a different apple ID, but the same account information?

    Purchases cannot be transferred between different Apple IDs.

  • HT2534 How can i download from two different store with the same account?

    I live in both countries but my credit card is registered in a french bank, therefore it is not recognised by the Aussie store on itunes. There are apps or music i want to get form the Aussie store as well as music and other apps from the french one...
    Is it possible to have two stores under the same account????? I wish apple could fix this, which could result in more spending as you can buy from different store!

    Wait 90 days
    Why would you start a new account?  Why not just correct the original account?

  • Can i sync on different computers that have same account.

    i have a new computer, couldn't migrate from my old one since it stop working, can i sync on the new computer without loosing everything and puting it again. So can you sync on different computers that have the same account?

    Some of the information below has subsequently appeared in a document by turingtest2: Recovering your iTunes library from your iPod or iOS device - https://discussions.apple.com/docs/DOC-3991
    Your i-device was not designed for unique storage of your media. It is not a backup device and media transfer was designed for you maintaining a master copy of your media on a computer which is itself properly backed up against loss. Syncing is one way, computer to device, updating the device content to the content on the computer, not updating or restoring content on a computer. The exception is iTunes Store purchased content.
    iTunes Store: Transferring purchases from your iOS device or iPod to a computer - http://support.apple.com/kb/HT1848 - only media purchased from iTunes Store
    For transferring other items from an i-device to a computer you will have to use third party commercial software. Examples (check the web for others; this is not an exhaustive listing, nor do I have any idea if they are any good):
    - Senuti - http://www.fadingred.com/senuti/
    - Phoneview - http://www.ecamm.com/mac/phoneview/
    - MusicRescue - http://www.kennettnet.co.uk/products/musicrescue/
    - Sharepod (free) - http://download.cnet.com/SharePod/3000-2141_4-10794489.html?tag=mncol;2 - Windows
    - Snowfox/iMedia - http://www.mac-videoconverter.com/imedia-transfer-mac.html - Mac & PC
    - iexplorer (free) - http://www.macroplant.com/iexplorer/ - Mac&PC
    - Yamipod (free) - http://www.yamipod.com/main/modules/downloads/ - PC, Linux, Mac [Still updated for use on newer devices? No edits to site since 2010.]
    - 2010 Post by Zevoneer: iPod media recovery options - https://discussions.apple.com/message/11624224 - this is an older post and many of the links are also for old posts, so bear this in mind when reading them.
    Syncing to a "New" Computer or replacing a "crashed" Hard Drive - https://discussions.apple.com/docs/DOC-3141 - dates from 2008 and some outdated information now.
    Copying Content from your iPod to your Computer - The Definitive Guide - http://www.ilounge.com/index.php/articles/comments/copying-music-from-ipod-to-co mputer/ - Information about use in disk mode pertains only to older model iPods.
    Get Your Music Off of Your iPod - http://howto.wired.com/wiki/Get_Your_Music_Off_of_Your_iPod - I am not sure but this may only work with some models and not newer Touch, iPhone, or iPad.
    Additional information here https://discussions.apple.com/message/18324797

  • HT204053 I use 2 different apple ID's for two iPhones on my share everything account so how do I automatically download purchases on 1 phone w/1apple ID to 2nd phone w/different I'd on same account

    I have 2 IPhones on my Verizon share plan but I am using different Apple ID's on each phone as well as 2 icloud accounts. Should I be using the same apple & icloud I'd on both phones? I want to automatically recieve paid apps on both devices using either apple ID because of the shared account.Maybebsome of our free apps also. Help please

    Using same apple id for itunes and app store and enabling auto downloads will do what you want. Just leave different apple ids for icloud. That will preserve your contacts and calendars separate, give you extra storage and ability to communicate with imessage and facetime.

  • Vendor payment for different currency go to same account

    Hi,
    In the vendor master, I maintain both indonesia  currency bank account and USD bank account, (same bank key, diiferent bank account, different country, bank type 1 & 2), but in the payment run, when we use payment method C, payment couldn't differentiate vendor's IDR and USD bank account, both IDR and USD invoices go into IDR account.
    so how to solve the problem, how can we differentaite?

    Hi
    maybe you could try to write a substituion: 1. save the bank details on the vendor master with the currency key 2. write substitution - on invoice, the bank details = the currency of the document.
    For filling it automatically, you should have either a substitution rule either a mass change program which should change the line items before running the payment program. In both cases you need some abap code for checking that the bank type exists in the supplier's master data.
    Thanks,
    Rajesh

  • I have a disabled iPod touch that I cannot open; I have 2 girls with different ipods on the same account.  any suggestions?

    I have 2 daughters with ipod touches; both were hooked up using the same iTunes account.  one is disabled and she can't remember her passcode.  how can I get her ipod open?

    Connect the iPod to the computer she syncs her iPod with.  Then restore the iPod via iTunes.  If iTunes asks for the passcode and you can't enter the passcode, place the iPod in recovery mode and then restore. For recovery mode:
    iPhone and iPod touch: Unable to update or restore
    For how to restore.
    iTunes: Backing up, updating, and restoring your iPhone, iPad, or iPod touch software

  • How can i share tones between different iPhones on the same account

    I have two iPhones registered on the same iTunes account - one for work and one personal. I have bought a couple of ringtones through iTunes but find that I cannot see them in the iTunes library so cannot load a ringtone from one of my iPhones to the other. Any suggestion on how I can do this ?
    Regards
    Kev

    You will have to transfer the ringtones from the phone that has them to your iTunes library.
    File>Transfer Purchases.
    Then you can sync them to the other phone.

  • HT1495 Can 2 different users share one same account at the i Tunes store?IE my wife and I share the same account?

    How can 2 people (2 diffrent apple user ID) share a SINGLE account at iTunes?

    Drrhythm2 wrote:
    What's the best solution for this? I
    Copy the entire /Music/iTunes/ folder from her old compouter to /Music/ in her account on this new computer.

  • Switching Different iPhone 3G on Same Account

    I have a 16 Gig iPhone that was water damaged, so I had to pay $399 a few months ago to replace it with an 8 Gig model. Of course a few weeks later the 16 Gig model comes back to life and it's been working fine for the past 3-4 weeks.
    If I wanted to switch my AT&T account back to my old phone, can do it myself or do I have to go to an Apple store? Will there be a charge to transfer the account?
    I'm also going to sell my 8 Gig model on E-bay. How much can I get for it? Thanks.

    You can do this yourself by transferring the activated SIM card from your 8GB to your 16GB - with both iPhones powered off when doing so.
    Connect the 16GB to iTunes and you should be prompted to activate or reactivate the 16GB iPhone with AT&T.
    There is no charge for doing this.
    I would hold off selling your 8GB for a little while to be sure the 16GB is working properly 100% and for more than a day after the iPhone is reactivated. For one thing, your warranty is void on the 16GB and just because it has come back to life does not mean there isn't damage that will surface or that will cause usage problems.
    Check eBay or Craiglist regarding the going rate for a used 8GB iPhone 3G.

Maybe you are looking for

  • Migrating Netscape Bookmarks

    Hi, Received my new machine Thursday and am loving it! Upgrading from B&W G3 so unfortunately I can't use migration assistant as the G3 doesn't support Firewire target mode. Synced all my stuff through .mac and it was painless. Cloned my 2 hard drive

  • New computer, set up Nano?

    I just received a new beautiful computer (thanks, titi!) and i have an ipod nano. Is there anything i need to do to set up this computer to make my ipod work with it? when i plug in my ipod and click "ipod" on the left toolbar thing, i dont see the s

  • X pro crashes when inserting pages

    Running windows XP, up to date. Acrobat X pro, no updates available. I have inserted pages and combined files for years without issues. Today, it locks up and crashes once I select the file(s); it doesn't even ask where to insert the pages. I am at a

  • Export backup failures:

    We are getting export backup failures here is the export log: Connected to: Oracle9i Release 9.2.0.5.0 - Production JServer Release 9.2.0.5.0 - Production Export done in WE8ISO8859P1 character set and AL16UTF16 NCHAR character set server uses WE8MSWI

  • Why the people is complaining about the dust stripes in the ipad screen that the smart covert left?

    well i'va read in a lot of forums that talk very bad about the smart cover, because it left some stripes or lines on the ipad 2 screen, but i've just clean it with a microfiber cloth, so why some people say that, are permanent stripes??