Professional Documents
Culture Documents
SQL Day 4
SQL Day 4
SQL Day 4
Match(MatchID,Team1,Team2,Ground,date,Winner)
Player(PlayerID,LName,Fname,Country,YBorn,BPlace,FTest)
Batting(MatchID,PID,Order,HOut,NRuns,Fours,Sixes,NBalls)
Bowling(MatchID,PID,NOvers,Maidens,NRuns,NWickets)
USING IN :
Q1> Find match Ids of all matches in the database in which Tendulkar batted.
Q2> Find Ids of players that have both bowled and batted in the ODI match 2689.
Q3> Find Ids of players that have either bowled or batted (or did both) in the ODI match 2689.
Q4> Find Ids of players who have batted as well as bowled in the ODI match 2689.
Equivalent sub-query...
Q6> Find the match information of all matches in which Dhoni has batted.
Q7> Find player ids of those players whose date of first test match(FTest) is not given in the
database.
USING ALL:
Q8> Find match IDs of those matches in which player 27001 bats and makes more runs than he
made
at every match he played at Melbourne.