jlisic jlisic - 2 days ago 5
MySQL Question

SQL and Database Design Project

For one of my classes, I have to complete an assignment that requires me to redesign a database and then develop reports on the data that is given to me. I then have to take the reported data and put that in a text file to turn in to prove I have done the assignment. So far, I have created the tables required with the information. I do not know how to develop the reports.

I have attached the assignment page as well that explains what the assignment is. My question is how do I develop these reports so that I can store the queries and the results of the reports in a .txt file? I am just unsure of how to even get started here.

I appreciate all of the help. Thank you!

Project Requirements

Answer

For example report for repeat customer should be something like:

 SELECT customer_id, count(*)
 FROM sales
 GROUP BY customer_id
 HAVING count(*) > 1

That will generate some rows, then copy query and result to your document.

Comments