Hello and welcome to Just Answer! i am Aitizaz and i will assist you today
can you please put this information in a text file with formatting so that i can have a clear understanding of the requirements?
OK! let me have a look at it
What is the condition to identify different household?
when do you need this?
in fact i have a commitment this weekend. i will try to do it as early as possible. can we take it to the next week if i cannot complete that on weekend?
Yes i will try to do that as early as possible and as a single statement.Thanks
i remained busy on the weekend as told you earlier. i will start working on it now and will get back to you soon.
Don't you think the result of the query should be 3?
Since MEYERS/A and MEYERS/B are two different records with nothing in common in the rest of the two columns as well
No problem. i am working on it and as soon as i am successful, i will post the SQL query here.
can you send me the complete database ( or some portion of it) so that i may apply the query on it?
i am trying different queries and have not been able to get the exact result as yet. but i am working and will intimate you shortly
I am out of ideas on this. i will opt out so that any other expert may help you. Thank you very much for your patience.
Hello - My name is***** see that our previous expert was unable to help you. I will pick up this up and assist you. I see that you are running this in a mainframe - Is this a going against a VSAM file or are you running a query against a database. I think I understand your requirements, and you are looking for a SQL query correct ?
And just so I am clear on my understanding - your example data would return to you 5 correct ? All rows are unique.
Also - what type of database are you running this against ?
I'm the cute one .. :).. I have a question. To help me understand you goal. You say in your initial post that the result should be a count of 2 but I see all 5 rows have unique values when comparing all 3 columns.
Are you basing unique if col1 or col2 or col3 are unique.
Walk me through your though process of why 1,2,5 is counted as 1 household.
Wouldn't SMITH/M *****@******.*** ID1 be unique from SMITH/M *****@******.*** and SMITH/S *****@******.*** ID1 ?
Got it - I have your sample data loaded up in a MySQL database and will get back to you. If I can't come up with anything shortly I will release the question to see if another expert can assist you.
You have a complex problem and I don't know if a SQL query can give you what you need. You will for sure be able to accomplish this with a stored procedure that exists in the database. A stored procedure will give you the ability to perform logic against the data where SQL only allows you to pull data.
I will though try my best to see if a query can be written for this.
Good morning, do you still need help with this?
If so, I should be able to assist.
I would like to begin by asking -- When you look at the data, how are you personally able to recognize that several rows have the same household?
Once we know that, we should be able to build a query around it.