Assignments for July 21

Complete Part 2 of the SQLite tutorial. It’s long; start early.

Create a new database called fec (the .sqlite gets added on when you create it). Download this CSV file of contributors to Wisconsin Rep. Tammy Baldwin during the second quarter of 2011. Import it into the fec database, creating a table called baldwin. Look at the CSV file in Excel before you define the fields in SQLite – be sure to define the zip field as VARCHAR, not INTEGER. Just define the date field as VARCHAR for now.

Once you’ve done that, write queries to do the following:

      Show the contributors from Hawaii
      Show contributors from Philadelphia who gave at least $1,000
      Show contributors who listed their occupation as CEO, with the largest amount first

Reading: This Tulsa World story on lottery ticket sales.
Send me both the fec.sqlite file and the SQL from your queries (I can check the results).


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s