Download the file
Baseball-Player.sql. into a top-level directory named
exactly
Baseball-1.
Download the ActivityJournal.txt and fill it in for each query.
The file contains SQL statements to create and populate a
table of baseball players:
The players are all those on the active rosters of teams in the American League East as of 4/28/2015.
Create a file Query.sql with SELECT statements that retrieve the information requested below. To run your queries against the provided database, do the following:
$ sqlite3 SQLite version 3.7.9 2011-11-01 00:52:41 Enter ".help" for instructions Enter SQL statements terminated with a ";" sqlite> .read Baseball-Player.sql sqlite> .read Query.sqlYou may, of course, try out your queries from the command line while in sqlite, but only what is in Query.sql will be graded.
We will grade each query in Query.sql for correctness (5 points each). The desired output is in QueryOutput.txt.
Find all the information on all the catchers (position 2) in the database.
Find the name and age of all pitchers (position 1) on the Rays.
Find the name, number, and team of all outfielders (positions 7 through 9) who are 25 years old or younger.
Find the name and number of all infielders (positions 3 through 6) on the Red Sox.
Find the name, number, and team of all pitchers who are over 30 years old.