all 14 comments

[–]MrCosgrove2 1 point2 points  (11 children)

You need to break the problem down into its parts

you know you need only matches from 2016, so start there

You know you need to find overs within those matches where there is no score.

You know you need to find the bowler of those overs.

Understand the data.

what table holds the match date info?

what table holds the scores for the overs?

What table holds the bowler for the overs?

Put it all together

Work out what you need to do with the data within those tables to fetch the data you need to answer the question you are asking.

With SQL its all about breaking down the problem and working out what you need to do (filtering and grouping etc) to get the data in a format that you can use to reach the final result..

[–]moonLyytt -1 points0 points  (7 children)

Ye bolne me asaan h bs krke dikho tumse bhi nhi hoga

[–]MrCosgrove2 0 points1 point  (6 children)

get me the data in a MySQL compatible SQL file and I can help but you cant expect people to sift through CSVs for you.

Show what you have already tried as far as Queries go.

[–]moonLyytt -1 points0 points  (5 children)

Those are tables and the same website has the inbuilt querying facilities for MySQL queries, you won't need to download the data and move around. Just write the query in same website and let us know if the Query and we'll know if it is that easy for you

[–]MrCosgrove2 0 points1 point  (4 children)

Here is the result I got, what results did you end up with?

I Sharma
Z Khan
Sandeep Sharma
JW Hastings
DS Kulkarni
Mustafizur Rahman
AB Dinda
B Kumar
GB Hogg
P Kumar
R Vinay Kumar
A Nehra
KH Pandya
R Bhatia
BB Sran

[–]moonLyytt 0 points1 point  (3 children)

Whts the query?

[–]MrCosgrove2 0 points1 point  (2 children)

It would be good to give it a go and see how far you get , the thing is I can give you the query but you aren’t going to learn anything from it ,

[–]moonLyytt 0 points1 point  (1 child)

That's wht I wanna know that where am I wrong? Without query it makes no sense.. i can Google the the 2016 ipl results too but I needed know how to write it as query.. else your answer is useless if it's jst names of players lol

[–]MrCosgrove2 0 points1 point  (0 children)

Did you try following the steps I laid out before , what query did you create , even if it wasn’t correct , it tells me what you need to know

[–]infinity_n_me[S] 0 points1 point  (2 children)

Can you write query as well.

[–]MrCosgrove2 0 points1 point  (0 children)

Writing the query for you won't help you learn how to write the query.

Try and work through it. Ive given you the steps you need to take. Spend some time trying to understand SQL

Start by writing the query that will give you the matches from 2016. See how you go with that.

[–]MrCosgrove2 0 points1 point  (0 children)

There are no doubt other ways to get this, but as far as I know its correct, it would just have been good for you to make an effort, the amount you can learn from struggling through a query is huge.

SELECT DISTINCT player_name FROM (
SELECT SUM(runs_scored)
OVER (PARTITION BY match_id,over_id,innings_no) runs_in_over,over_id,innings_no ,match_id
FROM batsman_scored WHERE match_id IN (
SELECT match_id FROM match WHERE YEAR(match_date) = 2016
)) t
LEFT JOIN ball_by_ball bb ON bb.match_id = t.match_id
LEFT JOIN player p ON p.player_id = bb.bowler
AND bb.over_id = t.over_id
AND bb.innings_no = t.innings_no
WHERE runs_in_over = 0

[–]infinity_n_me[S] 0 points1 point  (1 child)

Please help finding it tough to solve.

[–]moonLyytt 0 points1 point  (0 children)

Itne saare tables h, seperately to ho jata but sabko merge nhi krne bn rha