SQL clause to list specific matching string parts
$30-250 USD
Paid on delivery
I have a MySQL table with fields email (varchar 255) and country (varchar 2). Email field holds an email address of the user and the country field holds his country, as represented by two character country code.
Lets consider this clause:
SELECT DISTINCT SUBSTRING_INDEX(email,'@',-1) FROM `table` WHERE country = "DE"
It lists all the domains of users from country code 'DE'. I need an SQL clause similar to this, except that it will only lists domains of whose users more than 95% are from the country code 'DE'. In other words, if 96% of users of '[url removed, login to view]' are from country code 'DE', then the output must contain '[url removed, login to view]', but if there are millions of users from 'DE' that use domain '[url removed, login to view]', but they do not represent over 95% of the all users of '[url removed, login to view]', then '[url removed, login to view]' is not listed in the output.
The idea is to output a list of email domains whose users are *most likely* from a specific country code (= 'DE')
Project ID: #4358701
About the project
Awarded to:
As i am a Database Developer and new to freelancing i have lot of expectation and confident to deliver most stable work. it will take less then a day to deliver your aim.
3 freelancers are bidding on average $42 for this job
Hi there, Please give me the database. I will give you the script. Ready to start right now. Kindly view PMB to further information about me. Thanks
My self Kartik Shah I have over 6 years experience to work in the web technologies and software field. I have experience to Work on: php, mysql, LAMP, ajax, jquery, json, javascript, xml, html, css, webserviecs wi More