SQL Problems

Data Set:

I have build a database on Dias11 in MySQL called BDA_VQ. You all have the ability to run SELECT queries on this database. You should connect to the database by sshing into dias11 and running 'mysql -p'. Your password is your 7-digit student ID.

All the code that you write to answer these questions should be put in a file called answers.sql in the top level of the assignment repository. You should also make a file called sql.md in the top level of your repository that includes a write-up with your answers to the questions.

In Class Questions:

1. How many tables are in this database?

2. How many users are currently set up?

3. Which table has the smallest number of entries? How many entries does it have?

4. How many answers have been posted for multiple choice questions?

Out of Class Questions:

5. How many quizzes were given to section 6 of CSCI 1320 in Fall 2015?

6. Which course has the most quizzes? How many quizzes does it have?

7. Which course has the most questions on quizzes? How many questions does it have?

8. What fraction of students who submit an answer for a function question eventually get it right?

9. How many courses have given questions of the "lambda" type?

10. Which user, by userid, has the most correct answers? How many do they have?

11. What are the three most common spec_types for variables in the problems?

12. What fraction of quizzes have coding questions?

13. What is the average number of multiple choice questions per quiz?

14. What is the average number of coding questions per quiz?

15. What is the most attempts per student for any course on any quiz?