📊 Foundation Phase: Week 3 PostgreSQL Practice & Query Mastery
A week of schema design, query solving, and unexpected clarity.

Hey, I'm Ramya 👋I write to learn, and I learn by building. This space is my digital notebook where curiosity meets clarity and every post reflects a milestone in my journey. I'm a final-year B.Tech student in Artificial Intelligence & Data Science at GMR Institute of Technology. I recently completed an internship at Tao Digital, where I worked on AWS cloud services and contributed to a Smart Fridge Annotation Project using YOLOv11. Learning Out Loud is my blog a place where I document what I learn, build, and reflect on. It’s organized into evolving series like:📚 Foundation Phase Series : Week-by-week insights from my early cloud and data engineering journey. I believe in thoughtful growth, clean documentation, and expressive storytelling. Whether it’s building ETL pipelines, annotating datasets, or writing about yoga and balance I’m here to share what matters.
👋 Introduction
After two weeks immersed in Linux and Cloud fundamentals, I transitioned into the relational world of SQL specifically PostgreSQL. This week wasn’t just about writing queries. It was about designing schemas, decoding data relationships, and building analytical fluency. Syntax was the surface. Logic was the goal.
🧱 Schema Design: Sales Database Setup
To ground my learning in real-world relevance, I built a mini sales database. This gave me a rich dataset to explore filtering, aggregation, joins, and window functions.
Tables Created
| Table | Purpose |
| customers | Stores customer details and signup info |
| products | Product catalog with pricing and category |
| orders | Order metadata including status and payment |
| order_items | Line items per order with quantity and price |
Data Inserted
20 rows into
customersandproducts80 rows into
orders~230 rows into
order_items
This schema became the foundation for all my query practice.
🧠 Query Practice: From Basics to Analytics
I solved 50 queries across three tiers of complexity. Each one taught me something new not just about SQL, but about how to think in terms of data.
🔹 Basic Queries
Customer listings and regional filters
Product price thresholds and category selections
Order status breakdowns and monthly summaries
🔹 Aggregations & Joins
Revenue per order, category, and region
Customer-level metrics: unique products, order counts
Payment method splits and delivery success rates
🔹 Advanced Analytics
Window functions for ranking and cumulative revenue
Basket analysis: frequently bought-together products
RFM segmentation and churn detection
Rollups and percent contributions across dimensions
📂 Daily Reflections
Each day’s progress is documented in my GitHub repository:
🔗 Day_Learning folder on GitHub
Includes breakdowns from Day 09 to Day 14, with query logic and reflections.
💡 Reflections: From “Oh No” to “Oh Yes”
When I first encountered window functions, I felt stuck. They seemed abstract and intimidating. But as I broke down each query step by step, I realized:
“Problems often feel bigger than they are until we start solving them. Clarity comes from understanding the concept behind the syntax.”
This mindset shift turned confusion into confidence. Each query became a puzzle. Each solution deepened my understanding of relational logic.
🌀 Thought
Week 3 wasn’t just about SQL it was about learning how to learn. When a concept feels unfamiliar, it’s easy to label it as “hard.” But when we slow down, understand the why, and build from the ground up, even the toughest problems start to feel solvable.



