En curso

Alter and Optimize sql query

I need someone to please change this SQL query to NOT use sub-query with IN, I need for this query to work faster.

Attached find the data table we are working with. About 7 million rows.

SELECT `MovieID`, COUNT(*) AS `Count`

FROM `download`

WHERE `UserID` IN (

SELECT `UserID` FROM `download`

WHERE `MovieID` = 995

)

GROUP BY `MovieID`

ORDER BY `Count` DESC

if the freelancer can solve this on the spot it would be great

Habilidades: MySQL, SQL

Ver más: freelancer sql c#, freelancer it sql, SQL Query, query table, freelancer sql, alter i, sql optimize, 2013 query, sql select order, query optimize, mysql alter table desc, query optimize mysql, need sql query, mysql optimize, sql query sql query, data feed sql query, mysql table count, mysql query freelancer, javascript radio group count, freelancer sql query, export admin data qc sql query, change sql query generated fluent nhibernate, crystal report group count, sql query working, optimize query mysql

Información del empleador:
( 84 comentarios ) Te Awamutu, New Zealand

ID de proyecto: #5214866

Adjudicado a:

elboukharimu

Hi I'm very interested helping you optimizing your sql query like I did before when we work together, I have more then 7 years of experience in SQL and database administration, modeling, and manipulating, please do not Más

$30 USD en 0 días
(18 comentarios)
4.5

39 los freelancers están ofertando un promedio de $22 para este trabajo.

CodeAmbassador

Hi, This is Janos from Hungary - I'd like to help. Assuming you can run teamviewer I'm quite happy to connect up and do the modification in front of you while I talk you through it on skype. Also I'm happy to take a Más

$34 USD en 2 días
(84 comentarios)
7.4
HussienSharaf

Hi, I can compact this query by using inner join instead of using embedded select. But I think that the real problem is the group by and order by. The columns that u group by, order by or put after the "where" must be Más

$14 USD en 3 días
(17 comentarios)
6.6
gopalvora

Hi ready to start i had more than 5 year experience in the php , mysql , jquery etc,, so let me know your view Thanks

$33 USD en 3 días
(106 comentarios)
6.6
DrTech76

Hello there! What you've asked for is not a problem to do at all, though I don't see why the sub-query is there in a firts place, could you explain more of where's this from and what's the use you make of it? Or it' Más

$20 USD en 0 días
(108 comentarios)
6.0
mihaibejenariu

SELECT `MovieID`, COUNT(*) AS `Count` FROM `download` D1 INNER JOIN `download` D2 ON D1.`UserID` = D2.`UserID` AND D2.`MovieID` = 995 GROUP BY `MovieID` ORDER BY `Count` DESC Regards, Owner of http Más

$14 USD en 3 días
(82 comentarios)
5.3
techvolcano

Hi, You may make it 2 separate queries instead of sub query. Let me know in which language it is written. Thanks.

$25 USD en 0 días
(32 comentarios)
5.0
kalpesh2804

Hello, I have experience in MySQL Query. i can try to optimize query using t.e.a.m.v.i.e.w.e.r. thanks Kalpesh

$29 USD en 1 día
(22 comentarios)
4.6
nibiranijum

Hi, First of all thanks for posting such a project. I am oracle certified developer and dba with more than 5 years of experience. I am expert in SQL, PL/SQL. I did lots of oracle project in freelancer. http://ww Más

$30 USD en 3 días
(7 comentarios)
4.5
manhpham

Hi there. I am senior developer from Vietnam. I have been working on this site for 2 years. I am interested in your [url removed, login to view] let's me help you. I can start now. Thank you so much

$35 USD en 1 día
(15 comentarios)
4.5
yubor

Hi. Here is redundant predikate with subquery (if you didn't mistake typing your query). Ready to help you with this project. Regards, Yuri.

$25 USD en 1 día
(30 comentarios)
4.4
LearningNew

More then 7 years of working experience in Telerik Open Access ORM, Entity FrameWork using Code First, Database First Approaches, ASP.NET, Window Service, Web Service, MVC 3.0, MVC 4.0, C#, VB.NET, SQL Server, Access, Más

$10 USD en 0 días
(2 comentarios)
4.2
maasoft

Expert is [url removed, login to view] 5+yrs of [url removed, login to view] to start [url removed, login to view] do it [url removed, login to view] the admin and ftp details to start work [url removed, login to view] us to serve you [url removed, login to view] for your reply.....

$24 USD en 1 día
(14 comentarios)
4.3
Reza2012

Hi I have more than 10 years experience in Database administration and SQL query writing. If you want see some of sample work I can supply you. Please see my profile. Thanks. May be the following is your solution: S Más

$30 USD en 3 días
(13 comentarios)
4.2
Dusan74

Hi, I modified your SQL query like this: SELECT [url removed, login to view], COUNT(*) AS [Count] FROM download D INNER JOIN (SELECT UserID FROM download WHERE MovieID = 995) U ON [url removed, login to view] = [url removed, login to view] GROUP BY [url removed, login to view] O Más

$10 USD en 1 día
(6 comentarios)
3.3
truongnguyen86

Hi there, i'm sql expert, i'm willing to help you bro. Pls check my porfolio for more details about the jobs i have done before. Waiting for feedback bro, P.S: I can start right now

$30 USD en 1 día
(8 comentarios)
3.3
BhargavaB

Hi this is bhargava. I am expert in sql and Pl/sql . your query is ready . can you please select my bid . i am ready to provide modified query .

$15 USD en 0 días
(13 comentarios)
3.3
swagatab

Hello, I quickly tried with a revised query (without subqueries) with a few test records and got the same results. I'll send you the query if you are OK with my bid. You can accept my proposal formally only if the q Más

$25 USD en 0 días
(3 comentarios)
3.2
codetod

Dear Buyer Query optimized, please accept my bid if the below query works for you. SELECT [url removed, login to view], COUNT(*) as Count FROM download a, download b WHERE [url removed, login to view] = [url removed, login to view] and b.movieid=995 GROUP BY [url removed, login to view] Más

$15 USD en 1 día
(7 comentarios)
2.7
arturluizbr

I already have solved your query to do not use sub query. Your query is to count how many copies of each movie was downloaded by each user that had downloaded this movie before? If that is correct, than I've done Más

$30 USD en 1 día
(1 comentario)
2.6
taskmanageryd

hello,Ready to start from now.i will complete this job in 1 hour..contact asap me to start wrok from now

$10 USD en 1 día
(2 comentarios)
2.6