I joined a real sample file called [login to view URL] to this job.
Your script must be correctly optimized since there could be several thousands results in your final file.
Here is job description :
In the [login to view URL] file, you must:
A) Find all individuals keywords (Column B) and count the number of time you found each word in the file. All words found that generated a combinated total of less than 10 clicks (column F) must be removed.
B) I want you to generate with the words found in "A" all possible 2 words combinaisons. For each combinaisons you will search how many search term in [login to view URL] use these 2 words. For all found search terms using these 2 words, I want you to SUM column F (Click), column J (cost), column L (Sales) and Column Q (Total income).
Here is a quick example [login to view URL]:
cheap cat | 10 clicks | 10 sales | 10$ cost | 20$ income
very cheap cat | 100 clicks | 10 sales | 100$ cost | 20$ income
nice cats | 20 clicks | 20 sales | 20$ cost | 40$ income
dog for sale | 10 clicks | 5 sales | 5$ cost | 10$ income
mouse for sale | 5 click | 2 sales | 2$ cost | 5$ income
A)
cheap | 10 + 100 = 110 clicks
cat | 10 + 100 = 110 clicks
very | 100 clicks
nice | 20 clicks
cats | 20 clicks
dog | 10 clicks
for | 15 clicks
sale | 10 + 5 = 15 clicks
mouse | 5 clicks
Since we remove all words with less than 10 combined click "mouse" will be remove.
cheap | 10 + 100 = 110 clicks
cat | 10 + 100 = 110 clicks
very | 100 clicks
nice | 20 clicks
cats | 20 clicks
dog | 10 clicks
for | 15 clicks
sale | 10 + 5 = 15 clicks
B) Here would be all possible combinaison to search in [login to view URL]
cheap + cat | 10 + 100 = 110 clicks | 10 + 10 = 20 sales | 10 + 100 = 100$ cost | 20 + 20 = 40$ income
cheap + very | 100 clicks | 10 sales | 100$ cost | 20$ income
cheap + nice | NOT FOUND REMOVE THIS LINE FROM RESULT
cheap + cats | NOT FOUND REMOVE THIS LINE FROM RESULT
cheap + dog | NOT FOUND REMOVE THIS LINE FROM RESULT
cheap + for | NOT FOUND REMOVE THIS LINE FROM RESULT
cheap + sale | NOT FOUND REMOVE THIS LINE FROM RESULT
---
cat + very | 100 clicks | 10 sales | 100$ cost | 20$ income
cat + nice | NOT FOUND REMOVE THIS LINE FROM RESULT
cat + cats | NOT FOUND REMOVE THIS LINE FROM RESULT
cat + dog | NOT FOUND REMOVE THIS LINE FROM RESULT
cat + for | NOT FOUND REMOVE THIS LINE FROM RESULT
cat + sale | NOT FOUND REMOVE THIS LINE FROM RESULT
---*** I STOP SUM EXAMPLE HERE ***---
very + nice
very + cats
very + dog
very + for
very + sale
---
nice + cats
nice + dog
nice + for
nice + sale
---
cats + dog
cats + for
cats + sale
---
dog + for
dog + sale
---
for + sale