So basically, I had one interview which went well but then I was given a task where I had to normalize the data first and then should move on with the sub-questions by writing SQL queries. I got stuck while doing the data normalization itself in MYSQL, but my other(sub-question) queries were correct. If anyone knows how to do this please do help and if you could explain the process will be helpful. I am just getting my hands on in SQL queries and questions like these are little harder for me even though the theory part is clear.
So the column that I have to normalize is water_source. I can use substring_index() but even though tried an tested still couldn’t get the result. I have to split column values into rows. Here is the table link below –
Basically I tried and tested several queries but couldn’t find any. I really want to know the answer, if anyone could help I will grateful. Also if it is solved using mysql it will be helpful for me understand.
Anamika is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.