• orders.csv file with information about orders. It contains purchase entries:
    • buyer’s email
    • name of the item
    • item quantity
    • date of the purchase.
  • A sample program that processes orders.csv.

Exercises

Exercises 0a, 0b, and 0c are implemented in the sample program attached above.

  1. Write a program that opens orders.csv, reads it and transforms into a struct. Bonus points for storing a purchase date as time.Time in the struct.

0b. Find a buyer (or buyers) with most purchases. Home many unique items did the buyers buy?

0c. Calculate statistical metrics about sales: min, mean, and max number of sold items?

  1. How many unique buyers are there?

  2. How many unique items were sold? Print all the items.

  3. Is there at least one buyer that purchased the same item in different days?

  4. Calculate the total number of buyers for each item.

  5. Write a function that, given a buyer’s email, prints all items that they bought.

  6. What is the most popular day of the week?

  7. For each buyer, generate a file that contains all items that they bought. Each name should be named as <email>.txt with @ replaced by .. E.g. a file for user@gmail.com should be called user.gmail.com.txt.