SQLite: Using the senate_votes database that we downloaded and looked at in class, write SQL to answer the following questions:
- How many votes had 0 no votes?
- How many votes had a margin of less than 3 votes?
- How many times did each result occur?
- How many nomination votes got more than 30 Republican “no” votes?
- What was the result of all cloture votes, and how many times did each result occur?
A: SELECT * FROM votes where total_no = 0
A: SELECT * FROM votes WHERE total_margin < 3
A: SELECT result, COUNT(*) FROM votes GROUP BY 1
A: SELECT * FROM votes WHERE question=’On the Nomination’ and gop_no > 30
A: SELECT result, COUNT(*) FROM votes WHERE question like ‘%Cloture%’ GROUP BY 1
Then, import this CSV file from the National Science Foundation into a new sqlite database. Email me the database you created and the SQL statements for the senate votes data.