Need Sql query for removing duplicates and fixing the relation table

I need help to modify a sql database.

i have a "name" table which has a ManyToMany relationship to another table called "hobbies". The third table "hobbies_id_name_id" contains the relationship between name and hobbies table.

I need a sql query to fix the relationship table and delete the duplicates from the name table

name table:

id name

1 tom

2 tim

3 lisa

4 jan

5 tomas

6 tom => delete duplicate

7 lisa => delete duplicate

8 tom => delete duplicate

hobbies table:

id sports

1 football

2 tennis

3 basketball

4 cricket

5 baseball

relationshop table:





3..........................6 => replace with 1


4..........................8 => replace with 1

5..........................7 => replace with 3

5..........................8 => replace with 1

Skills: Database Administration, Database Programming, MySQL, SQL

See more: delete duplicate rows in sql server, delete duplicate records in sql server 2008, delete duplicate records in sql server using row_number, how to remove duplicates in sql query, sql delete duplicate rows, sql remove duplicates from query results, delete duplicate records in sql server, how to delete duplicate rows in oracle, sql query find child parent items table, parent child relation using sql query, sql query parents table, sql query filter table, sql query check child table, sql query tree structure table, tree table sql query, display table sql query result joomla, filtering jsp table sql query, query find parent child relation table database, recursive sql query menu table, sql query data table tree

About the Employer:
( 10 reviews ) Heilbronn, Germany

Project ID: #19741824

59 freelancers are bidding on average €25 for this job


Hello, As an expert in SQL, i am very much interested to provide you the required sql query. Are you using MySQL? Looking forward to have a positive response from you. Thanks

€19 EUR in 1 day
(187 Reviews)

Hello there, i'm expert on writing SQL query, i've done many SQL to remove duplicate and update data like this. Pls share me your table and data and then i will write script to do. Waiting for your response if interest More

€50 EUR in 1 day
(168 Reviews)

Hi I am a database expert with 12 years experience in handling MS SQL and MySQL databases. I have worked as DBA for large ERP databases and use to write and do performance tuning for SQL queries, procedures and trig More

€30 EUR in 1 day
(72 Reviews)

Hi, I am 8 years experienced SQL developer. I understand your point. I can complete this project within two hours . Please check my profile for my work quality . Thanks, Bhaskar Mandal

€26 EUR in 1 day
(43 Reviews)

Hi, I have good experience in writing SQL queries. I would like to remove duplicate and remap the ids in the table hobbies_id_name_id Available for discussion and ready to start now. Looking Forward to your response. R More

€30 EUR in 1 day
(87 Reviews)

Hi. I've read carefully your job description I'm have a lot of experiences in JAVA, VB, .NET ,SQL QUERY, .... And I also have experiences in Excel VBA developing and data mining. If you hire me, then I will try my be More

€30 EUR in 7 days
(33 Reviews)

Dear my employer! I checked your project carefully. I have a deep understanding of the problems you are going to realize in your project. They are not so difficult for me with 12 years of app development years. Unt More

€100 EUR in 1 day
(13 Reviews)

Hi, nice to meet you. I have checked your project carefully, so that i feel I can do this project. I am good in web basic skill and i am familiar with some frameworks such as Laravel, Wordpress, Codeigniter, Nodejs and More

€30 EUR in 1 day
(17 Reviews)

Hello I am a sql query expert** I have already read your description in more details and have interested in your project. I can do it perfectly soonest as your requirment Thank you.

€19 EUR in 1 day
(19 Reviews)

Dear Sir, My name is Parth. I've read your brief and can see that you need SQL query for removing duplicates and fixing the relation table ***** We've passed all freelancer certifications relevant to this project. ** More

€80 EUR in 1 day
(2 Reviews)

Hi, I am interested in the task and have an experience in it. please ping me to discuss more. thanks

€9 EUR in 1 day
(29 Reviews)

Hi i am expertise in sql query and warehousing i would like to resolve ur problem in notnkore than 1 hour if you are interested ping me

€34 EUR in 1 day
(14 Reviews)

Hi, I'm a data engineer with over 5 years of experience developing data-centric applications using SQL, PL/SQL, and many other tools. I can complete this work within a few hours with 100% precision and quality. I'm More

€30 EUR in 0 days
(4 Reviews)

I am ready to work with you. Let me know if you are ready to go...Accordingly I will take above example and will provide you solution. I am a database / Business Intelligence / solution architect. I have more than 14 More

€25 EUR in 1 day
(7 Reviews)

I'm glad to bid to this project. First tell me the complete information about your project I have faced and solved many similar issues so have good understanding about the task. Yes I can do this project for you becaus More

€30 EUR in 7 days
(4 Reviews)

Hi Here is the sql. UPDATE TBL_HOBBIES_NAME SET NAMEID = (SELECT MINID FROM (SELECT MIN([login to view URL]) MINID,[login to view URL],[login to view URL] FROM TBL_NAME A JOIN TBL_NAME B ON [login to view URL] = [login to view URL] GROUP BY [login to view URL],[login to view URL]) D WHERE NAMEID = [login to view URL]) DELETE More

€25 EUR in 7 days
(7 Reviews)

Hello You result in db can be: select [login to view URL] ,[login to view URL], min([login to view URL]) as realtionship_nameid, min([login to view URL]) as realtionship_hobbies from name, hobbies, realtionship where [login to view URL] More

€30 EUR in 1 day
(15 Reviews)

Hello. I looked carefully at your posts. mysql database manage & programming is my best work. also i have a enough history in this part. If you have the opportunity to talk to me, I think I can create a less cost e More

€23 EUR in 0 days
(8 Reviews)

Interesting Wonderful project! We are good team in many experiences in Web developing. We are masters of math and web design. If you keep in touch with us, you can get satisfy result. Thanks a lot!

€20 EUR in 7 days
(1 Review)

Dear, Sir. Nice to meet you. I read your project description carefully and am very interested in working for your project. I am able to provide the best product with awesome and good performance and offer a good resu More

€25 EUR in 1 day
(5 Reviews)