Find Jobs
Hire Freelancers

MySQL query

$20-30 USD

Completed
Posted almost 2 years ago

$20-30 USD

Paid on delivery
This is a $20 job and as simple as this - the first freelancer to respond with a working query, I'll just award and pay that freelancer. Is this possible just using MySQL and not building page? I have 2 tables. Table1 has the following fields id, user_id, answer It has 100,000 entries with different unique user_ids and their corresponding answer to a answer "Which city do you live in" Table2 has answer, number_of_winners This table has 250 answers (different cities) and the corresponding number of winners we want to select at random. Can a query be built that will Select random set of users from Table1 with limit of number_of_winners for each distinct answer. Must be random and must be limited to the correct number of winners.
Project ID: 33687105

About the project

16 proposals
Remote project
Active 2 yrs ago

Looking to make some money?

Benefits of bidding on Freelancer

Set your budget and timeframe
Get paid for your work
Outline your proposal
It's free to sign up and bid on jobs
Awarded to:
User Avatar
Hi there! I hope this works for you, it worked for me just fine ;) Best regards, Esteban insert into results select T1.*, ROW_NUMBER() OVER(PARTITION BY answer) as winner_nr, RAND() as winner_order from Table1 T1 order by [login to view URL]; select T1.* from results T1 inner join Table2 T2 on T1.answer=[login to view URL] where winner_nr <= T2.number_of_winners order by winner_order;
$20 USD in 1 day
5.0 (7 reviews)
4.2
4.2
16 freelancers are bidding on average $91 USD for this job
User Avatar
Dear sir, I have gone through your outsourced requirement " MySQL query " and have analyzed that I have right credentials ( MySQL ) to execute your esteemed project. You will never go wrong choosing me :)
$20 USD in 7 days
5.0 (48 reviews)
6.0
6.0
User Avatar
Yes it's possible to select random winners from the data base without making a landing page. Your task is tricky but I can solve for you in hours. If you find me fit for the work then let's have a chat!
$20 USD in 1 day
5.0 (4 reviews)
2.4
2.4
User Avatar
Hi! I've read your article with interests. What you want is just same as what I often produce, I think. Some days ago, I finished the task as similar as your idea perfectly for my friends. If we share our idea each other, we may get the excellent success in time and become best friends. Indeed I hope so. I like best to help my good friends, always. If you make a decision, the best result is a piece of cake for us. Best Regards.
$20 USD in 1 day
5.0 (5 reviews)
1.6
1.6
User Avatar
Hello, I have read the description carefully and understood the requirement. We can connect both tables and then select random users and apply a limitation to the winners. This can be done. Please PM me with more details. Thank you
$20 USD in 1 day
5.0 (1 review)
1.1
1.1
User Avatar
Hello. Happy Firday! I am a full-stack developer. I feel confident in your project because I have read your requirements carefully and worked on projects you are familiar with before. Last 8 years driven by programming passion I've designed and developed many websites and apps with a wide variety of modern web technologies. My tech stack is Front-end(React, Vue, ..), Back-end(Laravel, Wordpress, Django, Flask, Node.js, Express) and Database(MySql, MongoDB, ..) I'm available 24/7 for your projects I have enough ability and you can look forward to long-term cooperation with me. I want to work with you. Please contact me. Thank you Valeriya
$1,125 USD in 7 days
0.0 (0 reviews)
0.0
0.0
User Avatar
Hi There, I hope you are doing great. Please Message me so we can discuss, I have good knowledge in MySQL. Regards
$20 USD in 1 day
0.0 (0 reviews)
0.0
0.0

About the client

Flag of UNITED KINGDOM
london, United Kingdom
5.0
117
Payment method verified
Member since Oct 29, 2006

Client Verification

Thanks! We’ve emailed you a link to claim your free credit.
Something went wrong while sending your email. Please try again.
Registered Users Total Jobs Posted
Freelancer ® is a registered Trademark of Freelancer Technology Pty Limited (ACN 142 189 759)
Copyright © 2024 Freelancer Technology Pty Limited (ACN 142 189 759)
Loading preview
Permission granted for Geolocation.
Your login session has expired and you have been logged out. Please log in again.