{"id":30360504,"url":"https://github.com/rugwiroparfait/alx_sql","last_synced_at":"2025-08-19T14:22:57.884Z","repository":{"id":309033845,"uuid":"1034951365","full_name":"Rugwiroparfait/ALX_SQL","owner":"Rugwiroparfait","description":"This repo is where I save my queries and learning materials in Data Science program from ALX","archived":false,"fork":false,"pushed_at":"2025-08-09T10:54:43.000Z","size":2114,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-08-09T12:30:15.319Z","etag":null,"topics":["anaconda","data","data-analysis","jupyter-notebook","sql"],"latest_commit_sha":null,"homepage":"","language":"Jupyter Notebook","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/Rugwiroparfait.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2025-08-09T10:34:13.000Z","updated_at":"2025-08-09T10:56:50.000Z","dependencies_parsed_at":"2025-08-09T12:30:16.397Z","dependency_job_id":"368a198e-f3e3-49d7-ad3a-0dbe0522f3c8","html_url":"https://github.com/Rugwiroparfait/ALX_SQL","commit_stats":null,"previous_names":["rugwiroparfait/alx_sql"],"tags_count":null,"template":false,"template_full_name":null,"purl":"pkg:github/Rugwiroparfait/ALX_SQL","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rugwiroparfait%2FALX_SQL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rugwiroparfait%2FALX_SQL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rugwiroparfait%2FALX_SQL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rugwiroparfait%2FALX_SQL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Rugwiroparfait","download_url":"https://codeload.github.com/Rugwiroparfait/ALX_SQL/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Rugwiroparfait%2FALX_SQL/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":271166866,"owners_count":24710585,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-08-19T02:00:09.176Z","response_time":63,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["anaconda","data","data-analysis","jupyter-notebook","sql"],"created_at":"2025-08-19T14:22:56.765Z","updated_at":"2025-08-19T14:22:57.840Z","avatar_url":"https://github.com/Rugwiroparfait.png","language":"Jupyter Notebook","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ALX SQL Data Science Exercises\n\nWelcome to my SQL exercise repository for the ALX Data Science Program! This repository contains a collection of Jupyter notebooks that demonstrate various SQL concepts and techniques learned throughout the program.\n\n## 📚 Repository Overview\n\nThis repository contains hands-on SQL exercises and tutorials covering fundamental to advanced SQL concepts. All exercises are implemented using Jupyter notebooks with SQL magic commands, allowing for an interactive learning experience.\n\n## 🎯 Learning Objectives\n\nThrough these exercises, I have learned to:\n- Write basic SQL queries using `SELECT`, `WHERE`, and `LIMIT` statements\n- Perform data filtering and analysis using logical and comparison operators\n- Use SQL functions for string manipulation, numeric calculations, and date/time operations\n- Apply aggregation functions and window functions for advanced data analysis\n- Join multiple tables and work with relational databases\n- Create summary statistics and reports\n- Clean and transform data using SQL\n\n## 📁 Repository Structure\n\n### Basic SQL Operations\n- `Basic SQL queries in a notebook 1 [Exercise].ipynb` - Fundamental SELECT, WHERE, and LIMIT operations\n- `SELECT and WHERE [Notebook].ipynb` - Basic querying techniques\n- `interacting_with_sql.ipynb` - Introduction to SQL in Jupyter notebooks\n- `sql_notebooks.ipynb` - General SQL notebook practices\n\n### Data Types and Functions\n- `Converting between data types.ipynb` - Type conversion and casting\n- `SQL string functions.ipynb` - String manipulation functions\n- `Using SQL string functions to clean data.ipynb` - Data cleaning with string functions\n- `SQL numeric functions and aggregations [Exercise].ipynb` - Mathematical operations and aggregations\n- `Transform columns using numeric functions[Notebook].ipynb` - Column transformations\n- `Initial data analysis with numeric functions [Notebook].ipynb` - Exploratory data analysis\n- `SQL DateTime functions [Exercise].ipynb` - Date and time operations\n- `Quick_maths.ipynb` - Mathematical calculations in SQL\n\n### Logical Operations and Filtering\n- `Logical and comparison operators ii.ipynb` - Advanced logical operations\n- `Using logical and comparison operators [Notebook].ipynb` - Filtering data with conditions\n- `Conditional-calculations-using-IF.ipynb` - Conditional logic in SQL\n- `Grouping with a case statement.ipynb` - CASE statements for data categorization\n\n### Advanced SQL Techniques\n- `SQL window functions [Exercise].ipynb` - Window function basics\n- `Aggregation using window functions [Notebook].ipynb` - Advanced aggregations\n- `Using value based window functions [Notebook].ipynb` - Value-based window operations\n- `Top-N analysis using ranking window functions [Notebook].ipynb` - Ranking and top-N analysis\n\n### Data Analysis and Reporting\n- `Create a summary statistic report in SQL [Notebook].ipynb` - Statistical reporting\n- `Filtering and analysing summary statistic report [Notebook].ipynb` - Report analysis\n- `Reading data across multiple tables [Notebook].ipynb` - Multi-table operations\n\n### Documentation and Best Practices\n- `Aliasing and commenting in SQL.ipynb` - Code documentation and readability\n\n## 🛠️ Technologies Used\n\n- **Database**: SQLite (Chinook sample database)\n- **Environment**: Jupyter Notebook\n- **Language**: SQL with Python integration\n- **Tools**: SQL magic commands (`%%sql`, `%sql`)\n\n## 🗃️ Database Schema\n\nMost exercises use the Chinook database, which represents a digital media store with the following main tables:\n- `customers` - Customer information\n- `employees` - Employee data\n- `invoices` - Sales transactions\n- `invoice_items` - Individual items in transactions\n- `tracks` - Music tracks\n- `albums` - Music albums\n- `artists` - Music artists\n- `genres` - Music genres\n- `media_types` - File formats\n- `playlists` - Music playlists\n\n## 🚀 Getting Started\n\n### Prerequisites\n- Python 3.x\n- Jupyter Notebook\n- SQLite\n- Required Python packages:\n  ```bash\n  pip install jupyter\n  pip install ipython-sql\n  pip install sqlalchemy\n  ```\n\n### Running the Notebooks\n1. Clone this repository:\n   ```bash\n   git clone https://github.com/Rugwiroparfait/ALX_SQL.git\n   cd ALX_SQL\n   ```\n\n2. Start Jupyter Notebook:\n   ```bash\n   jupyter notebook\n   ```\n\n3. Open any notebook file (`.ipynb`) and run the cells sequentially\n\n4. Load the SQL extension in each notebook:\n   ```python\n   %load_ext sql\n   %sql sqlite:///chinook.db\n   ```\n\n## 📖 Key Concepts Covered\n\n### Beginner Level\n- Basic SELECT statements\n- WHERE clauses and filtering\n- LIMIT and data sampling\n- Comparison and logical operators\n\n### Intermediate Level\n- JOIN operations\n- Aggregate functions (COUNT, SUM, AVG, etc.)\n- GROUP BY and HAVING clauses\n- String and numeric functions\n- Date/time manipulations\n\n### Advanced Level\n- Window functions (ROW_NUMBER, RANK, DENSE_RANK)\n- Common Table Expressions (CTEs)\n- Complex subqueries\n- Data analysis and reporting techniques\n\n## 🎓 About ALX Data Science Program\n\nThis repository is part of my coursework in the ALX Data Science Program, a comprehensive program designed to build practical skills in data science, including:\n- Data manipulation and analysis\n- Statistical analysis\n- Machine learning\n- Data visualization\n- Database management\n\n## 📝 License\n\nThis project is for educational purposes as part of the ALX Data Science Program.\n\n## 🤝 Contributing\n\nThese are personal exercise solutions, but feel free to:\n- Report issues or suggest improvements\n- Share alternative solutions\n- Provide feedback on code quality\n\n## 📧 Contact\n\nFor questions or discussions about these SQL exercises, feel free to reach out!\n\n---\n\n*Happy Learning! 🚀*\n\n**Note**: This repository demonstrates my progress and understanding of SQL concepts throughout the ALX Data Science Program. Each notebook represents a step in my learning journey.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugwiroparfait%2Falx_sql","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Frugwiroparfait%2Falx_sql","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Frugwiroparfait%2Falx_sql/lists"}