GitHunt
YA

yashpals1986/Smartphone-SQL-Analytics-pgadmin-PostgreSQL

SQL Project | PostgreSQL | pgadmin

๐Ÿ“ฑ Smartphone Market SQL Analytics Project

A comprehensive market analysis designed to uncover pricing strategies and segmentation in the smartphone industry.

SQL
Status


๐ŸŽฏ Project Overview

This project analyzes 1,963 real smartphone records across 12 major brands (Apple, Samsung, Xiaomi, Google, OnePlus, etc.) for 25 features using SQL to solve real-world business problems faced by e-commerce platforms, market intelligence firms, and product teams.

Business Context:
This analysis is framed from the perspective of a data analyst at a consumer electronics platform, evaluating competitive pricing, feature trends, and market segmentation to support inventory planning, marketing strategy, and product decision-making.


๐Ÿ“Š Dataset Highlights

Metric Value
Total Records 1,963 smartphones
Brands Analyzed 12 (Apple, Samsung, Xiaomi, Google, OnePlus, Motorola, Realme, Vivo, Oppo, Nokia, etc.)
Specifications Tracked 25 (RAM, camera, battery, screen size, price, OS, network support, etc.)
Price Range โ‚น5,309 - โ‚น147,005 (Budget โ†’ Ultra-Premium)
Time Period 2015-2025 (10-year market window)
OS Coverage Android & iOS

๐Ÿ› ๏ธ SQL Skills Demonstrated

Beginner Level

โœ… SELECT, WHERE, ORDER BY, GROUP BY
โœ… Aggregate functions (COUNT, AVG, MIN, MAX, SUM)
โœ… Basic filtering and sorting

Intermediate Level

โœ… CASE WHEN for conditional logic
โœ… HAVING clause for filtered aggregations
โœ… Multi-table joins (if extended)
โœ… Derived metrics and business calculations

Advanced Level

โœ… Window Functions: RANK(), DENSE_RANK(), ROW_NUMBER(), NTILE()
โœ… Percentile Analysis: PERCENTILE_CONT()
โœ… Common Table Expressions (CTEs): Complex multi-step queries
โœ… Value Scoring Models: Custom weighted algorithms
โœ… Market Segmentation: Clustering logic in SQL


๐Ÿ“‚ Repository Structure

smartphone-sql-analytics/
โ”œโ”€โ”€ README.md
โ”œโ”€โ”€ data/
โ”‚   โ””โ”€โ”€ smartphone.csv
โ”œโ”€โ”€ schema/
โ”‚   โ”œโ”€โ”€ create_tables.sql
โ”‚   โ””โ”€โ”€ load_data.sql
โ”œโ”€โ”€ queries/
โ”‚   โ”œโ”€โ”€ 01_beginner_queries.sql
โ”‚   โ”œโ”€โ”€ 02_intermediate_queries.sql
โ”‚   โ”œโ”€โ”€ 03_advanced_queries.sql
โ”‚   โ””โ”€โ”€ screenshots/
โ”‚       โ””โ”€โ”€ query_result_images/
โ””โ”€โ”€ insights/
    โ”œโ”€โ”€ business_insights.md
    โ””โ”€โ”€ Basic_pgadmin_infographics/
        โ””โ”€โ”€ charts_and_visuals/

๐Ÿ“ˆ Key Business Insights

1. Market Segmentation

  • Budget (<โ‚น20K): 35% of market
  • Mid-Range (โ‚น20-40K): 30% of market
  • Premium (โ‚น40-80K): 25% of market
  • Luxury (>โ‚น80K): 10% of market

๐Ÿ’ฐ Smartphone Market Share by Price Segment

4  Graph Price Segments vs market share

2. Operating System Dynamics

  • Android: 95% market share, average price โ‚น40,000
  • iOS: 5% market share, average price โ‚น100,000 (premium positioning)

๐Ÿค– Android vs ๐ŸŽ iOS โ€” Market Share Comparison

6  Android vs iOS Market Share

3. Technology Adoption

  • 5G Support: 45-60% adoption across brands
  • High Refresh Rate (120Hz+): Now standard in premium phones
  • Fast Charging (67W+): Key mid-range differentiator

๐Ÿ“ถ Average 5G Smartphone Price by Brand

14  Graph of Brands vs Avg 5G Phone price

4. Competitive Positioning

  • Volume Leaders: Samsung, OnePlus, Motorola (most models)
  • Revenue Leaders: Apple, Samsung (premium pricing)
  • Value Champions: Xiaomi, Realme (best specs for price)

๐Ÿ“Š Price Distribution (Percentiles) Across Brands

17  Price Percentiles by Brand


๐Ÿ’ก Query Highlights

Beginner Queries (1-8)

  • SELECT, WHERE, ORDER BY, GROUP BY
  • COUNT, AVG, MIN, MAX, SUM
  • Market composition and price distribution

Intermediate Queries (9-13)

  • CASE WHEN for segmentation
  • HAVING clause for filtered aggregations
  • Price-to-spec value analysis
  • Feature availability by price tier

Advanced Queries (14-19)

  • Window Functions: RANK(), DENSE_RANK(), ROW_NUMBER(), NTILE()
  • Percentiles: PERCENTILE_CONT() for quartile analysis
  • CTEs: Complex multi-step queries
  • Custom Scoring: Weighted algorithms for value ranking
  • Trend Analysis: Year-over-year comparisons with LAG()

๐Ÿ’ผ Resume Bullet Point

  • Analyzed 1,963 smartphones across 12 brands using PostgreSQL
  • Built 19 SQL queries from basic aggregation to advanced window functions
  • Applied PERCENTILE_CONT, NTILE, LAG for market segmentation and trend analysis
  • Generated insights: market leaders, 5G adoption (45-60%), value opportunities using weighted scoring algorithm

๐Ÿ“ง Connect

Yashpal Suwansia
IIT Bombay Alumnus Passionate about bridging Business Strategy with Data Science.

๐Ÿ“ง Email: ysuwansia@gmail.com
๐Ÿ’ผ LinkedIn: https://www.linkedin.com/in/yashpal-suwansia-a45a73260
๐Ÿ“ž Contact: +91-7976009985


โญ If this helped you, please star this repo!