# 💧 Maji Ndogo Water Infrastructure Analysis
## Project Overview
Maji Ndogo is a fictional country facing a severe water crisis. This project involves an end-to-end SQL-based analysis of a **60,000-record water survey database**, collected by a team of field engineers, scientists, and surveyors. The goal was to understand how citizens access water, identify infrastructure problems, detect data integrity issues, and ultimately build an actionable improvement plan for the government.
This project was completed as part of the **ALX Data Analytics Programme** and spans four progressive parts — from initial data exploration to building a live project tracking table for repair teams.
---
## 🗂️ Repository Structure
```
Maji-Ndogo-Water-Infrastructure-Analysis/
│
├── Part_1_Maji Ndogo_Integrated Project.sql # Data exploration & pollution data cleaning
├── Part_2_Maji Ndogo_Integrated Project.sql # Water source analysis & queue time insights
├── Part_3_Maji Ndogo_Integrated Project.sql # Auditor report & corruption detection
├── Part_4_Maji Ndogo_Integrated Project.sql # Provincial analysis & project progress table
├── README.md # This file — project overview
├── README_Part1.md # Detailed guide for Part 1
├── README_Part2.md # Detailed guide for Part 2
├── README_Part3.md # Detailed guide for Part 3
└── README_Part4.md # Detailed guide for Part 4
```
---
## 🛠️ Tools & Technologies
- **MySQL** — Primary database and query engine
- **SQL Concepts Used:**
- `SELECT`, `WHERE`, `GROUP BY`, `ORDER BY`, `HAVING`
- `JOIN` (INNER, LEFT)
- Aggregate functions (`SUM`, `AVG`, `COUNT`, `MIN`, `MAX`)
- String functions (`CONCAT`, `REPLACE`, `LOWER`, `LTRIM`, `RTRIM`, `LIKE`, `SUBSTRING_INDEX`)
- Date/time functions (`DATEDIFF`, `TIMEDIFF`, `DAYNAME`, `HOUR`)
- Window functions (`DENSE_RANK`, `PARTITION BY`)
- `CASE` statements …