I used Python and SQLite to try to answer all of the questions. My method was straightforward: I attempted to clean all of the data provided, including Receipt, Brand, and User. I attempted to automate and keep all of the functions tidy when working on this in Python so that I could reuse most of the code in future projects.
I haven't done much with JSON datasets before, but I had a wonderful time utilizing several preset methods in pandas to pull out information from JSON data.
Later, I convert the dataframe to a database file so that I may utilize it with Dbeaver, my SQL platform. I could have used it with Python IDE, but I prefer SQL IDE for dealing with SQL queries. It also allows you to experiment with the dataset and see all of the results for a single fast query.
For the SQL code, everything is neatly structured and displayed inside the Jupyter notebook. I've also submitted my SQL file containing the database and code.
Thank you!!