Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/jamesehiabhi/northwind-operations
NorthWind Descriptive Analysis
https://github.com/jamesehiabhi/northwind-operations
sql sql-server
Last synced: 4 days ago
JSON representation
NorthWind Descriptive Analysis
- Host: GitHub
- URL: https://github.com/jamesehiabhi/northwind-operations
- Owner: jamesehiabhi
- Created: 2025-02-03T00:47:37.000Z (5 days ago)
- Default Branch: main
- Last Pushed: 2025-02-03T01:29:52.000Z (5 days ago)
- Last Synced: 2025-02-03T01:31:09.349Z (5 days ago)
- Topics: sql, sql-server
- Homepage:
- Size: 0 Bytes
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# NorthWind-Operations
## Overview Of the NorthWind Descriptive Analysis
![]()
The Northwind database is a sample database created by Microsoft for educational and demonstration purposes. It simulates the operations of a fictional company called Northwind Traders, which imports and exports speciality foods from around the world. This documentation aims to provide a detailed overview of the database schema, including its tables, relationships, and key functionalities.
### Tables
**The Northwind database consists of the following tables:**
- categories: Stores information about product categories, including category ID, name, description, and picture.
- customer_demographics: Contains customer demographic data, including customer type ID and description.
- customers: Holds customer information such as ID, company name, contact details, and address.
- customer_customer_demo: Represents a many-to-many relationship between customers and customer demographics.
- employees: Stores employee data, including employee ID, personal details, contact information, and managerial relationships.
- suppliers: Contains details about product suppliers, including supplier ID, company name, contact information, and homepage.
- products: Stores product information such as product ID, name, supplier ID, category ID, pricing, and inventory details.
- region: Defines regions with a region ID and description.
- shippers: Holds data about shipping companies, including shipper ID, company name, and contact information.
- orders: Stores order information, including order ID, customer ID, employee ID, shipping details, and order dates.
- territories: Contains territory information with territory ID, description, and associated region ID.
- employee_territories: Represents the many-to-many relationship between employees and territories.
- order_details: Stores details about order items, including order ID, product ID, unit price, quantity, and discounts.
- us_states: Holds information about US states, including state ID, name, abbreviation, and region.### Relationships
**The database schema includes several relationships between tables:**
- Customers are associated with orders through the customer_id field in the orders table.
- Employees are linked to orders through the employee_id field in the orders table.
- Products are associated with suppliers and categories through foreign key constraints in the products table.
- Orders are connected to shippers via the ship_via field in the orders table.
- Territories are associated with regions through the region_id field in the territories table.
- Employee territories are linked to employees and territories through the employee_id and territory_id fields in the employee_territories table.
![]()
### Key Insights
**1. Categories Table:**
- The database contains a categories table with information about different product categories.
- Example Query: SELECT categoryid, categoryname FROM categories;**2. Customers Table:**
- The customers table holds information about customers, including their names and contact details.
- Example Query: SELECT customerid, customername, contactname FROM customers;**3. Employees Table:**
- The employees table contains details about employees, including their birthdates and names.
- Example Query: SELECT employeeid, firstname, lastname FROM employees WHERE firstname LIKE '%a%';**4. Order Details Table:**
- The orderdetails table provides details of orders placed, including product IDs and quantities.
- Example Query: SELECT orderid, productid, quantity FROM orderdetails WHERE quantity > 20;**5. Orders Table:**
- The orders table includes information about orders, such as customer IDs and order dates.
- Example Query: SELECT * FROM orders WHERE customerid = 21;**6. Products Table:**
- The products table contains information about products, including their prices.
- Example Query: SELECT * FROM products ORDER BY price DESC LIMIT 5;**7. Suppliers Table:**
- The suppliers table holds information about suppliers.
- Example Query: SELECT * FROM suppliers LIMIT 5;
![]()
### Advanced Queries and Insights
**1. Filtering and Aggregation:**
- The database supports advanced filtering and aggregation queries. For example, filtering order details where the quantity is greater than 20 or aggregating the total quantity of products ordered.
- Example Query: SELECT orderid, SUM(quantity) FROM orderdetails GROUP BY orderid HAVING SUM(quantity) > 50;**2. Date Range Filtering:**
- Queries can filter employees based on their birthdates within a specific range.
- Example Query: SELECT * FROM employees WHERE birthdate BETWEEN '1950-01-01' AND '1960-12-31';**3. Distinct Values:**
- The database can retrieve distinct values, such as unique countries from the customers table.
- Example Query: SELECT DISTINCT country FROM customers;
### Conclusion
The NorthWind database provides a comprehensive view of a company's sales operations, with detailed information about products, customers, employees, orders, and suppliers. The SQL queries in the file demonstrate various techniques for data retrieval, filtering, aggregation, and sorting, offering valuable insights into the database's structure and content.
This report highlights the versatility and depth of the NorthWind database, making it a valuable resource for data analysis and business intelligence.See further analysis here - https://github.com/jamesehiabhi/NorthWind-Operations/blob/main/Northwind_deep%20learn.pdf
### *Kindly share your feedback and I am happy to Connect 🌟*