Skip to content

Latest commit

 

History

History
437 lines (327 loc) · 12 KB

File metadata and controls

437 lines (327 loc) · 12 KB

❓ Frequently Asked Questions (FAQ)

Quick answers to the most common questions about the SQL Engineering Handbook.


🎯 General Questions

What is the SQL Engineering Handbook?

The SQL Engineering Handbook is a production-ready learning resource with 100+ real-world SQL queries, each including:

  • ✅ Business problem & context
  • ✅ Step-by-step SQL solution
  • ✅ Performance considerations
  • ✅ Common mistakes & how to avoid them
  • ✅ Interview tips & follow-up questions
  • ✅ Practice challenges

Perfect for: Data analyst interviews, portfolio building, SQL upskilling, and desk reference during work.


Who is this for?

  • 📊 Data Analysts - Interview prep and real-world query patterns
  • 🎓 Students - Learning SQL fundamentals and advanced topics
  • 💼 Career Changers - Transitioning into analytics or data roles
  • 👨‍💻 Engineers - Developers needing SQL for backend applications
  • 📈 Business Analysts - Understanding data and reporting

Skill Level: Beginner to Intermediate (progressing to Advanced)


How is this different from other SQL resources?

Most tutorials are just code snippets. This handbook includes:

Feature This Handbook Other Resources
Business Context ✅ Yes ❌ Usually not
Interview Tips ✅ Yes ❌ Rarely
Common Mistakes ✅ Yes ❌ Rarely
Performance Notes ✅ Yes ❌ Sometimes
Real Datasets ✅ Yes ❌ Usually synthetic
Progressive Learning ✅ Yes ❌ Random order

How much does it cost?

Free! 🎉

The entire handbook is:

  • ✅ Free to use
  • ✅ Open source (MIT License)
  • ✅ Available on GitHub
  • ✅ No paywalls or premium content

How do I get started?

  1. Clone or fork the repository
  2. Set up a local database (MySQL, PostgreSQL, or SQLite)
  3. Load the schema from 10_Schema/
  4. Start with 01_Fundamentals/
  5. Run the examples and modify them
  6. Progress through modules in order

See README.md for detailed instructions.


📚 Learning Questions

What's the recommended learning order?

Follow the modules in sequence:

  1. 01_Fundamentals → Basic queries (SELECT, WHERE, ORDER BY)
  2. 02_Aggregations → Summarizing data (COUNT, SUM, GROUP BY)
  3. 03_Joins → Multi-table queries (INNER, LEFT, FULL)
  4. 04_Subqueries → Nested queries and advanced filtering
  5. 05_CASE_WHEN → Conditional logic and transformations
  6. 06_CTEs → Query organization and readability
  7. 07_Window_Functions → Advanced analytics (RANK, LAG/LEAD, etc.)
  8. 08_Interview_Questions → Real interview prep
  9. 09_Business_Case_Studies → Real-world projects

Each module builds on the previous one.


How long does it take to complete?

Estimated 40-50 hours depending on pace:

Module Hours Difficulty
01_Fundamentals 2-3 Easy
02_Aggregations 2-3 Easy-Medium
03_Joins 3-4 Medium
04_Subqueries 3-4 Medium
05_CASE_WHEN 2-3 Medium
06_CTEs 2-3 Medium
07_Window_Functions 5-6 Hard
08_Interview_Questions 4-5 Medium-Hard
09_Business_Case_Studies 8-10 Hard

Plus: Additional time for practice, modifications, and real-world projects.


Do I need prior SQL experience?

No! This handbook is designed for complete beginners. We start with the absolute basics (SELECT statements) and progressively build to advanced topics.

You do need:

  • Basic computer literacy
  • A SQL database (free)
  • A text editor or IDE
  • 30-60 minutes per week

Should I memorize SQL syntax?

No. Focus on understanding concepts:

  • What does each clause do?
  • Why would I use this pattern?
  • When should I use JOIN vs. subquery?

Syntax is easily looked up online. Conceptual understanding is what matters for:

  • Solving real problems at work
  • Answering interview questions
  • Writing efficient queries

Can I skip modules?

Not recommended. Each module builds on the previous:

  • JOINS need GROUP BY (from Aggregations)
  • CASE WHEN needs WHERE conditions (from Fundamentals)
  • Window Functions need CTEs for readability (from CTEs)

If you already know a topic: Skim the module and move to the next.


What if I get stuck?

  1. Re-read the explanation in the .md file
  2. Review the examples with careful attention
  3. Run the exact example first before modifying
  4. Open a discussion on GitHub with your question
  5. Check discussions - your question may already be answered
  6. Take a break and return with fresh eyes

See SUPPORT.md for more help resources.


💻 Technical Questions

Which databases does this cover?

Primary: MySQL 8.0+

Also works with:

  • ✅ PostgreSQL 12+ (minor syntax adjustments)
  • ✅ SQLite 3.0+
  • ✅ SQL Server 2016+ (with some modifications)

Planned: PostgreSQL-specific variations in v1.1


How do I set up the sample database?

See 10_Schema/README.md for:

  • CREATE TABLE statements
  • Sample data INSERT scripts
  • Setup for MySQL, PostgreSQL, SQLite
  • Docker setup options

Quick start:

-- Run the SQL files from 10_Schema/
SOURCE 10_Schema/01_create_schema.sql;
SOURCE 10_Schema/02_insert_sample_data.sql;

Can I use my own database instead?

Yes, but you'll need to:

  1. Adjust table names in examples
  2. Verify column names and data types
  3. Update references to the provided schema

Recommendation: Start with the provided schema to learn, then adapt to your own.


Why is my query failing?

Common causes:

  • Syntax error - Check against the module example
  • Column doesn't exist - Verify in 10_Schema/
  • Database not loaded - Run the schema setup scripts
  • Wrong database type - MySQL vs PostgreSQL differences
  • Typo in table/column name - Case-sensitive in some DBs

Solution:

  1. Copy the exact example from the handbook
  2. Run it in your IDE
  3. Then modify it step by step

What SQL tools should I use?

Free Options:

Cloud Options:

  • ☁️ AWS RDS Free Tier
  • ☁️ Google Cloud SQL
  • ☁️ Azure SQL Database

Local Setup:

  • 🐳 Docker containers
  • 📦 Download MySQL/PostgreSQL

Can I use this with a cloud database?

Absolutely! Examples work with:

  • AWS RDS MySQL/Aurora
  • Google Cloud SQL
  • Azure SQL Database
  • DigitalOcean Managed Databases

Just adjust the connection string in your IDE.


🎯 Interview Preparation

Is this suitable for interview prep?

Yes! The handbook includes:

  • ✅ 50+ real interview questions
  • ✅ Company-specific patterns
  • ✅ Multiple solution approaches
  • ✅ Follow-up questions
  • ✅ Best practices for whiteboarding
  • ✅ Common variations and edge cases

See 08_Interview_Questions/README.md for details.


What companies' questions are covered?

Companies represented:

  • 🔵 Meta (Facebook)
  • 🔴 Google
  • 🟠 Amazon (AWS)
  • 🟣 Microsoft
  • 🟢 Apple
  • 🟡 Twitter/X
  • 💼 And more

Questions span Data Analyst, Analytics Engineer, and Data Engineer roles.


How should I prepare for interviews?

  1. Complete modules 1-6 - Ensure fundamentals are solid
  2. Study window functions - Very common in interviews
  3. Review the 50+ interview questions
  4. Practice writing solutions on paper or whiteboard
  5. Time yourself - Can you solve in 20-30 minutes?
  6. Explain your reasoning - Communication is key
  7. Ask clarifying questions - Don't assume requirements

Are there follow-up questions?

Yes! Each question includes:

  • ✅ Follow-up variations
  • ✅ Edge cases to consider
  • ✅ Performance improvements
  • ✅ Alternative approaches

Practice explaining different solutions.


🤝 Contributing & Community

Can I contribute?

Yes! Contributions are welcome. See CONTRIBUTING.md for:

  • How to submit solutions
  • Guidelines for new content
  • Pull request process
  • Code review expectations

What types of contributions are welcome?

  • 📝 New SQL examples and variations
  • 🐛 Bug fixes (typos, incorrect queries)
  • 📚 Improved explanations
  • ❓ Additional interview questions
  • 📊 PostgreSQL/SQLite variants
  • 🎥 Video tutorials or visual guides
  • 🌍 Translations to other languages

How do I submit a contribution?

  1. Fork the repository
  2. Create a feature branch
  3. Make your changes following guidelines
  4. Submit a pull request
  5. Respond to maintainer feedback

See CONTRIBUTING.md for detailed instructions.


Can I share this with others?

Please do! The handbook is MIT licensed, so you can:

  • ✅ Share with colleagues and classmates
  • ✅ Link to it in your blog or portfolio
  • ✅ Mention it on social media
  • ✅ Use examples in presentations
  • ✅ Redistribute with attribution

How do I stay updated?

  • Star the repository on GitHub
  • 📧 Watch for releases - Get notifications
  • 📢 Follow on social - @theammarngp-makes
  • 💬 Join discussions - Be part of the community

🐛 Troubleshooting

I get "syntax error" when running queries

  1. Check your database type (MySQL vs PostgreSQL)
  2. Copy the exact example from the handbook
  3. Verify table/column names exist
  4. Check for missing quotes or parentheses
  5. Open a discussion with the exact error

The schema won't load

  1. Verify you're using the right database software
  2. Check file permissions and encoding
  3. Try running SQL statements line by line
  4. Ensure you have CREATE TABLE permissions
  5. See SUPPORT.md for help

My results don't match the examples

  1. Verify you're using the exact same sample data
  2. Check for NULL values or data type mismatches
  3. Compare GROUP BY and WHERE clauses carefully
  4. Run with intermediate queries to debug
  5. Open a discussion with your query

How do I get help?

See SUPPORT.md for:

  • GitHub discussions for questions
  • Issues for bug reports
  • Troubleshooting guide
  • Additional resources

📊 Project Status

What version is this?

Current: v1.0.0 - Core modules complete

In Development: v1.0.1 (Window Functions completion)

See ROADMAP.md for upcoming releases and features.


What's coming next?

Planned for future releases:

  • ✅ Query Optimization & Performance Tuning
  • ✅ PostgreSQL-specific features
  • ✅ Advanced Business Analytics
  • ✅ Video tutorials
  • ✅ Interactive practice platform

See ROADMAP.md for complete timeline.


Is this project active?

Yes! Regular updates and improvements:

  • 📅 New features planned through 2027
  • 👥 Community contributions welcome
  • 💬 Active discussions and support
  • 🐛 Bug fixes and improvements

📞 Still Have Questions?

  • 💬 Open a discussion - Ask any question
  • 🐛 Report an issue - For bugs or feature requests
  • 📧 Contact on GitHub - Direct messages for specific needs
  • 🔗 LinkedIn - theammarngp

🌟 Quick Links

Resource Link
Main Handbook README.md
Getting Help SUPPORT.md
Contributing CONTRIBUTING.md
Release History CHANGELOG.md
Future Plans ROADMAP.md
Database Schema 10_Schema/README.md

Can't find what you're looking for?
Open a Discussion →

Part of the SQL Engineering Handbook