I have the data with two columns Var1, and Var2 with comma-separated lists like this
Var1 ---- Var2 --- Coinciding
Apple, Orange, Grape ---- Orange, Plum --- 1
Watermelon, Grape ---- Grape, Watermelon --- 2
Melon, Apple ---- NULL --- 0
Apple, Pear ---- Pear --- 1
Orange, Apple ----- Grape, Orange, Apple --- 2
Melon, Pear ----- Apple, Orange --- 0
I need to calculate the third column, called "coinciding" containing the count of coincidences in two variables of the respective row (in the example above I calculated it manually)
This needs to be written in MySQL and I need to run it quickly on a dataset with 5000 rows.
You can assume that there is no typos and all delimiters are properly placed. Actually, if it matters, the delimiter is line break (\n) rather than comma.
I've been writing and debugging SQL for a decade. What your asking basically is an optimized way of counting the number of word collisions between each column fields.
My approach is to build an INTERSECTION SET function that will count the common words from each CSV.
Let me know if you're interested.
$5 USD în 3 zile
5,0 (1 recenzie)
0,4
0,4
8 freelanceri plasează o ofertă medie de $6 USD/oră pentru proiect
I have 10+ years experience and more than 600 projects completed on this platform. Please send sample text file to parse. What information do you want to store in MySQL? I am very interested to work on this project. Ready to start ASAP.
Hello!
I am ready to help you with your task!
I am experienced developer of web-based apps (CRM, etc) using PHP+MySQL+jQuery+jQgrid+Bootstrap3.
Please do not hesitate to contact me via messenger!
Hi,
I am professional web developer in reputed IT company. I have completed many websites on my job tasks. Now a days looking for personal work to create my own revenue and I am always believe in long term relationship.
I will provide you hundred percent satisfaction on work as you require.
I will Provide attractive design and look for your website.
I hope you will give me chance to show my knowledge.
We are group of people who are working professionals in reputed IT companies on all the different types of technology.
Thanks and Regards,
Jaydeep