DBIS Lab 2, Aug 2, 2002 Assignment due on Fri August 9th 9.30 AM (will accept submissions in the afternoon provided the printing time is before 9.30) Can be done in groups of 2. Absolutely no copying between groups. Schema for Cricket Statistics ----------------------------- players(player_id, name, year-of-birth); -- year-of-birth: 4 digit numeric matches(match_id, country, venue) team_match(team, match_id) played_in(player_id, team, match_id) ODIBattingStats(player_id, matches, runs, dismissals, centuries); TestBattingStats(player_id, matches, runs, dismissals, centuries); ODICaptaincy(player_id, team, matches, won, lost, draw); Partnership(match_id, player1_id, player2_id, runs); Things for you to do -------------------- A. Schema/Data ----------- 1) Write SQL create table statements for all the above tables, and insert statements to fill in the tables with sample data You can use the data in dbis. to test your queries, but create your own test data for the submission. Submit a session where all statements from create table are executed. B. Queries: ----------- Write each query below, and submit an execution session containing all the queries. 1. List the identifiers of captains with number of matches played for some team is greater than 2. 2. List the names of all captains along with the names of the teams they captained. 3. Report names of successful Captains (successful = won more matches than lost for some team) along with team names 4. List the batsman with good ODI record (ODI run average > 30) and a good Test record (Test run average > 40). NOTE: don't worry about batsmen with 0 dismissals, assume they don't exist 5. List the names of all players who have played at Wankhede stadium (can change Wankede to anything convenient). 6. List names of all players (with team name) in matches where the opposing team has a partnership of 200 or more.