{"id":26608178,"url":"https://github.com/sharkb8t/sql-challenge","last_synced_at":"2026-02-04T15:03:42.636Z","repository":{"id":268965882,"uuid":"906012356","full_name":"Sharkb8t/sql-challenge","owner":"Sharkb8t","description":"Demonstrates my abilities in the use pgAdmin 4 to generate and navigate SQL databases.","archived":false,"fork":false,"pushed_at":"2025-03-07T23:11:37.000Z","size":8482,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T07:44:42.832Z","etag":null,"topics":["pgadmin4","sql"],"latest_commit_sha":null,"homepage":"","language":null,"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/Sharkb8t.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":"2024-12-20T01:22:42.000Z","updated_at":"2025-04-21T18:32:21.000Z","dependencies_parsed_at":"2025-03-23T23:40:22.484Z","dependency_job_id":"3289e08a-39a8-4958-b747-1d5754ff9560","html_url":"https://github.com/Sharkb8t/sql-challenge","commit_stats":null,"previous_names":["sharkb8t/sql-challenge"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/Sharkb8t/sql-challenge","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharkb8t%2Fsql-challenge","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharkb8t%2Fsql-challenge/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharkb8t%2Fsql-challenge/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharkb8t%2Fsql-challenge/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/Sharkb8t","download_url":"https://codeload.github.com/Sharkb8t/sql-challenge/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/Sharkb8t%2Fsql-challenge/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":261906846,"owners_count":23228355,"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","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":["pgadmin4","sql"],"created_at":"2025-03-23T23:40:14.763Z","updated_at":"2026-02-04T15:03:42.583Z","avatar_url":"https://github.com/Sharkb8t.png","language":null,"readme":"# sql-challenge\n---\n# 📊 Pewlett Hackard Employee Database Analysis\n\n## 📌 Project Overview\nThis project analyzes employee records for **Pewlett Hackard**, a fictional company, focusing on employees from the **1980s and 1990s**. The dataset includes information about employees, their departments, salaries, job titles, and management roles.\n\nUsing **PostgreSQL** and **pgAdmin 4**, I designed a relational database, created **SQL views** for easy data retrieval, executed queries to analyze employee records, and exported query results for deeper insights.\n\n---\n\n## 🏗 Database Schema\nThe database consists of **six main tables**:\n\n- **employees** - Employee details, including birth date, hire date, and gender.\n- **departments** - List of company departments.\n- **titles** - Job titles for employees.\n- **salaries** - Salary history for employees.\n- **dept_emp** - Relationship between employees and departments.\n- **dept_manager** - List of department managers.\n\n### **Entity Relationship Diagram (ERD)**\n\n\n![Database Schema](EmployeeSQL/Schema/Pewlett%20Hackard%20Schema%20-%20Image.png)\n\n---\n\n## 📊 Data Analysis Insights\n\nBelow are key findings based on the **output CSV files** in the `EmployeeSQL/Outputs/` folder.\n\n### **1. Employee Salaries (`employee_salaries.csv`)**\n- The dataset provides a detailed salary breakdown for each employee.\n- Salaries **vary significantly**, indicating a hierarchical pay structure.\n- **Further analysis:** Compare salary trends across different departments.\n\n### **2. Employees Hired in 1986 (`employees_hired_1986.csv`)**\n- This dataset helps track **long-serving employees** who have been with the company since 1986.\n- A **trend analysis** could identify **hiring spikes** over time.\n\n### **3. Department Managers (`dept_managers.csv`)**\n- Shows **current and past department managers**.\n- Useful for **identifying leadership trends** and tenure of managers.\n\n### **4. Employee Department Assignment (`employee_dept.csv`)**\n- Links employees to their respective departments.\n- Could be used to **analyze department growth** over time.\n\n### **5. Employees Named \"Hercules B\" (`employee_hercules-b.csv`)**\n- A rare set of employees whose **first name is Hercules** and **last name starts with 'B'**.\n- Fun fact: This query helps demonstrate **SQL filtering** capabilities.\n\n### **6. Sales \u0026 Development Employees (`sales+development_employees.csv`)**\n- Employees in the **Sales** and **Development** departments.\n- These teams are likely crucial for **business growth and innovation**.\n\n### **7. Employees in the Sales Department (`sales_dept_employees.csv`)**\n- Focuses on employees **only in Sales**.\n- This dataset can be used to analyze **department size** and **employee turnover**.\n\n### **8. Employees Sharing Last Names (`employees_shared_last_name.csv`)**\n- Shows employees with **common last names**.\n- Could suggest **family relationships** or **repeated hiring patterns**.\n\n---\n\n## 🛠 How to Use This Repository\n\n### **1️⃣ Clone the Repository**\n```sh\ngit clone https://github.com/yourusername/sql-challenge.git\ncd sql-challenge/EmployeeSQL/\n```\n\n### **2️⃣ Open pgAdmin**\n\n### **3️⃣ Import the table `schema.sql` file**\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkb8t%2Fsql-challenge","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fsharkb8t%2Fsql-challenge","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fsharkb8t%2Fsql-challenge/lists"}