University | Nanyang Technological University (NTU) |
Subject | BC2402: Designing and Developing |
Latte Logic: Uncovering Coffee Trends with SQL
1. INTRODUCTION
A. The Preamble
Coffee isn’t just a beverage; it’s an industry pulsing with regional trends, exponential growth, and shifting business models. To set the stage for your SQL assignment, consider the following landscape across Southeast Asia and North America:
Southeast Asia: Rapid Expansion & Local Champions
- Café Amazon sold an astonishing 400 million cups in 2024, about 1.1 million per day, and now operates nearly 4,922 outlets globally, with 4,485 in Thailand alone.
Source: https://www.nationthailand.com/business/corporate/40050529
- Malaysian-born Zuspresso (ZUS Coffee) is set to open up to 200 new stores this year, surpassing Starbucks in Malaysia.
- Indonesian chains are scaling fast: Kopi Kenangan now boasts over 900 outlets across the region, while Fore Coffee has launched 210+ stores in Indonesia, with expansion into Singapore.
Source: https://en.wikipedia.org/wiki/Kopi_Kenangan
- These growth trajectories underscore the importance of tracking key metrics, including outlet counts, daily cup sales, geographic expansion, and local versus global brand comparisons.
North America: Maturing Market & Strategic Pivoting
- The U.S. café industry is projected to generate around $74 billion in 2025, marked by a mature yet fragmented sector where chains and independents alike compete fiercely.
- Big names continue to evolve: Starbucks is renovating 1,000 stores to emphasize them as community “third places” and mandating more in-office days for corporate staff to reinvigorate its café roots.
Source: https://www.the-sun.com/money/14579316/starbucks-grab-and-go-future/
- Meanwhile, Royal Coffee is raising retail prices due to rising bean costs, tariffs, and elevated logistics—a change likely to ripple across the sector.
Source: https://www.businessinsider.com/raised-coffee-prices-expect-other-cafes-shops-will-too-2025-4
These trends underscore various data questions, which we explore in this assignment.
Hire a Professional Essay & Assignment Writer for completing your Academic Assessments
Native Singapore Writers Team
- 100% Plagiarism-Free Essay
- Highest Satisfaction Rate
- Free Revision
- On-Time Delivery
2. DATA DESCRIPTIONS
You are provided with a dataset extracted from various open sources. Refer to the corresponding sources for column descriptions and background information. The dataset consists of multiple tables. Specifically,
1. baristacoffeesalestbl
Sourced from https://www.kaggle.com/datasets/yashparab/barista-coffee-sales-data-for-eda-csv
2. caffeine_intake_tracker
Sourced from https://www.kaggle.com/datasets/prekshad2166/caffeine-intake-tracker-csv
3. coffeesales
Sourced from https://www.kaggle.com/datasets/visabelsarahsargunar/coffee-sales-dataset
3 added columns:
coffeeID
shopID
customer_id
See Q8 for details.
4. consumerpreference
Sourced from https://datadryad.org/dataset/doi:10.25338/B8993H
5. list_coffee_shops_in_kota_bogor
Sourced from https://www.kaggle.com/datasets/mrbuitenzorg/list-coffee-shops-in-kota-bogor
6. top-rated-coffee
Sourced from https://www.kaggle.com/datasets/asimmahmudov/top-rated-coffee
To mimic standard security policies in work settings, you must use the SQL database implementations provided with this document to complete your assignment. Likewise, you SHOULD NOT modify the database (i.e., data types, table structures) to complete this assignment.
3. PROJECT DELIVERABLES
The due date for the assignment is 3 October 2025 (23:59 hrs NTULearn server time)
You are only expected to submit one file, as follows:
1 x SQL script file
You are tasked to develop some SQL scripts to query the data, as follows:
You are to create SQL scripts (e.g., SELECT statements) that generate answers for the following queries.
IMPORTANT: You are encouraged to provide in-line comments to explain your logic. Critically, if you encounter data issues (e.g., data types) that necessitate cleansing and/or conversion, you must explain the reasons and your corresponding strategies. If your query output differs from the suggested output, you must justify your output if you believe your output is accurate or more fitting to the question. Otherwise, your solution will be deemed invalid.
1. [1 mark] Table considered: <baristacoffeesalesTBL>
How many product categories are there? For each product category, show the number of records.
2. [2 marks] Table considered: <baristacoffeesalesTBL>
For each customer_gender and loyalty_member type, show the number of records. Within the same outcome, within each customer_gender and loyalty_member type, for each is_repeat_customer type, show the number of records.
Buy Custom Answer of This Assessment & Raise Your Grades
3. [1 mark] Table considered: <baristacoffeesalesTBL>
For each product_category and customer_discovery_source, display the sum of total_amount.
A / B versions required with inline comments to justify differences.
4. [1 mark] Table considered: <caffeine_intake_tracker>
For each time_of_day category and gender, display the average focus_level and average sleep_quality.
5. [1 mark] Table considered: <coffeesales>
List the amount of spending (money) recorded before 12 and after 12.
IMPORTANT: Discuss any data issues observed with inline comments.
6. [1 mark] Tables considered: <consumerpreference>
Consider 7 categories of Ph values
- pH >= 0.0 && pH < 1.0
- pH >= 1.0 && pH < 2.0
- pH >= 2.0 && pH < 3.0
- pH >= 3.0 && pH < 4.0
- pH >= 4.0 && pH < 5.0
- pH >= 5.0 && pH < 6.0
- pH >= 6.0 && pH < 7.0
For each category of Ph values, show the average Liking, FlavorIntensity, Acidity, and Mouthfeel.
7. [3 mark] Tables considered: <coffeesales> + <list_coffee_shops_in_kota_bogor> + <top-rated-coffee> + <baristacoffeesalestbl>
IMPORTANT: The table name “top-rated-coffee” contains hyphens.
Stuck with a lot of homework assignments and feeling stressed ? Take professional academic assistance & Get 100% Plagiarism free papers
Background: The barista group (baristacoffeesalestbl) and coffee shops in kota bogor (list_coffee_shops_in_kota_bogor) have a common loyalty program. This question aims to reveal the synergy of this program (e.g., identifying the profitable combinations of outlets)
The 4 tables can be joint using the following structure and logic:
Consider the above table structures (i.e., columns):
coffeesales.coffeeID = `top-rated-coffee`.ID
coffeesales.shopID = list_coffee_shops_in_kota_bogor.no
coffeesales.customer_id = baristacoffeesalestbl.customer_id*
* The matching between the 2 customer_id is not straightforward
coffeesales.customer_id = 1 while baristacoffeesalestbl.customer_id = CUST_1
After joining the 4 tables, for each trans_month (coffeesaeles.date), list the top 3 combinations of store_id (baristacoffeesalestbl) and shopID (coffeesales) based on the sum of money (coffeesales).
The expected output is as follows:
[The above is an illustration of the expected result structures (i.e., columns). The specific values can be inaccurate (e.g., data type conversions).]
4. SUBMISSION
A submission folder will be made available on NTULearn. You can make as many submissions as necessary, but only the latest submission will be evaluated.
The submission must be made by 3 October 2025, 23:59.
Hire a Professional Essay & Assignment Writer for completing your Academic Assessments
Native Singapore Writers Team
- 100% Plagiarism-Free Essay
- Highest Satisfaction Rate
- Free Revision
- On-Time Delivery
Many students find BC2402 Database Design assignments challenging because they involve complex datasets, SQL joins, and business trend analysis. If you are struggling with structuring queries or handling data inconsistencies, our experts at Singapore Assignment Help provide plagiarism-free, AI-free computer science assignment help customised for NTU coursework. Strengthen your skills and boost grades with our trusted assignment help SG services.
Looking for Plagiarism free Answers for your college/ university Assignments.
- HFS351 – Safety Management and Audit ECA – July Semester 2025
- Supply Chain and Analytics Assessment 2: A Mathematical Approach to Solving Operational Challenges
- Organisations Assessment 2 – Problem-Solving Case Study Robodebt Scandal
- ICT330 Database Management Systems Tutor-Marked Assignment July 2025 Presentation
- BHB2405- Food Service Management Individual Project
- MGT202 Delivering Projects for Organisational Success Individual Assignment
- Arts Marketing and Audience Development Assessment Presentation
- AB3602 Strategic Management Written Assignment – EEA
- ACC202 Financial and Managerial Accounting Tutor-Marked Assignment July 2025 Semester
- 7025CL Management Finance Coursework 2 Assignment Brief, Assignment Guidelines and Rubric