Data Cleaning and Analysis on Apple Products Performance using SQL and Power BI
View the Project on GitHub josephGZC/apple_products_performance
link to the dashboard → Power BI Report
link to the code → SQL Data Cleaning and Exploratory Analysis
1. Project Background
2. Executive Summary
3. Dataset Overview
4. Data Cleaning and Preprocessing
5. Insights Deep-Dive
5.1. Trends in Quantity, Sales, and Orders
5.2. Product Category Insights
5.3. Product-Specific Trends
5.4. Geographic Breakdown
6. Recommendations
This project analyzes Apple product sales data from 2019 to 2022, with the primary objective of understanding trends in quantity sold across time, product categories, and geographic regions. SQL was used for data extraction, cleaning, and transformation, while Power BI served as the visualization tool for deriving insights and presenting trends. The goal is to uncover actionable patterns that can guide strategic pricing, product positioning, and region-specific marketing.
This report presents an analysis of Apple product sales from 2019 to 2022, with a primary focus on quantity sold, complemented by revenue and ordering behavior across time, product categories, and regions. While unit sales showed relative stability over the years, 2022 marked a decline in quantity sold—yet total revenue continued to rise. This contrast highlights Apple’s growing reliance on premium pricing strategies, particularly through high-end models like the iPhone 14. Purchasing patterns also reveal that most customers opted for single-item transactions in 2021 and 2022, suggesting a preference for personal, high-investment purchases rather than bulk buying.
Beyond general trends, category-level shifts and geographic performance provide deeper insight. Smartphones remained dominant in most years but briefly lost ground in 2021, when Airtags surged in popularity. Laptops and tablets maintained steady demand, with laptops seeing increased traction in the last two years. On the regional front, the United States led all markets in quantity sold, with cities like Glendale, Brooklyn, and New York emerging as local sales hotspots. These findings suggest clear next steps: introduce more accessible product tiers to retain sales volume, expand the accessory line to capture repeat purchases, and activate localized marketing strategies in high-converting regions.
SQL was used to validate, clean, and standardize all datasets before analysis and visualization. Below are the key steps and results:
To identify duplicates, the query grouped rows based on key identifiers (e.g., product_id, sale_id) using HAVING COUNT(*) > 1. No duplicate records were found in any of the tables.
Missing values were assessed using COUNT(*) - COUNT(column_name) for null checks and LTRIM(RTRIM(column_name)) = '' to identify blank but non-null entries. No missing or empty values were detected in essential fields.
launch_date, sale_date, and claim_date were converted into proper DATE types using CONVERT(DATE, column_name, 120).price and quantity were originally stored as strings and were converted to INT using CAST() to ensure accurate aggregation and computation.products_modified, sales_modified, and warranty_modified) for use in downstream analysis and dashboard integration.The KPI dashboard offers a snapshot of overall performance, highlighting a subtle but important shift in Apple’s sales dynamics in 2022. Compared to the previous year, total quantity sold and total orders both declined by 3.2%, yet total sales rose sharply by 29.4%, reaching $163 million, with average sales per transaction climbing 94.1%. This signals a revenue boost driven more by premium pricing than increased unit volume—a trend that may reflect consumer preference for high-end models, but also hints at growing price sensitivity.
This narrative is further supported by time-based trends. A multi-year view of quantity sold by quarter reveals a consistent quarterly increase across most years, except for 2020, which showed a decline—likely influenced by global disruptions. In a closer breakdown of sales performance per year, the data reveals that sales generally scale with higher quantities sold, but 2022 stands out for achieving higher sales despite the lower number of quantity sold from last year. While this surge in revenue is impressive, it underscores a growing reliance on premium pricing—a strategy that may not be sustainable if volume continues to drop.
|
|
|
|
|
|
A closer look at product categories reveals more nuanced consumer shifts. Smartphones were the top-selling category in 2019, 2020, and 2022, but their dominance slipped in 2021 when Airtags unexpectedly topped the charts—selling nearly twice as much as the next best category. This temporary surge demonstrates the strong potential of accessory-led growth, even when core device sales fluctuate.
Tablets and laptops maintained consistent 2nd and 3rd place positions, with laptops showing increased performance in 2021 and 2022. This sustained demand for productivity devices signals an opportunity to further develop non-smartphone segments, while the volatility of Airtag sales suggests that accessory success hinges on timing, utility, and refresh cycles.
Top-performing products reinforce the earlier patterns. The iPhone Xs (2020) and iPhone 14 (2022) were standout models, driving substantial revenue despite not breaking quantity records. The iPad 6th Gen in 2020 remains the highest-selling tablet, followed by the iPad Pro (M2) in 2022—which didn’t quite match the earlier peak, suggesting softening interest in newer tablet variants.
Meanwhile, Airtags surged in 2021 but declined sharply the following year, likely due to market saturation or a lack of need for repeat purchases. This shows how accessories can generate momentum but may require strategic updates or bundling to remain relevant. To fully capitalize on their potential, the accessory lineup needs to be refreshed regularly and aligned with customer utility.
|
|
|
|
|
|
Regionally, the United States consistently emerged as Apple’s top-performing market from 2019 to 2022, followed by China, Germany, and France. Within the U.S., cities such as Glendale, Brooklyn, and New York recorded the highest volume of sales, confirming them as key revenue-generating hubs.
These localized patterns reveal clear opportunities. Instead of relying solely on broad national campaigns, Apple can implement hyper-targeted strategies—focusing marketing, promotions, or event-based outreach in cities where engagement is already high. Strengthening these top-performing zones could create compounding growth effects.
Introduce More Accessible Product Tiers. Address the dip in quantity sold by launching mid-range alternatives to flagship models or enhancing trade-in and financing options. This ensures broader reach without diluting brand value, especially in price-sensitive markets.
Expand and Strategically Refresh Accessory Lines. Build on the momentum shown by Airtags in 2021 by releasing new accessories with strong utility or lifestyle appeal. Offer curated bundles or limited-edition drops to drive repeat purchases and complement mainline product sales.
Deploy Localized Campaigns in High-Performing Markets. Reinforce Apple’s presence in top-performing U.S. cities like Glendale, Brooklyn, and New York by investing in geo-targeted marketing, exclusive regional offers, or experiential events to maximize impact where demand is already proven.