For a completely isolated environment:
– On Linux MySQL/PostgreSQL, table names are case-sensitive. The scripts usually use lowercase. Stick to one case.
In the world of database training, documentation, and software testing, few artifacts have achieved the legendary status of the . Since its creation by Microsoft in the late 1990s as a sample for Access, Northwind has been ported to virtually every database system—SQL Server, MySQL, PostgreSQL, SQLite, Oracle, and even NoSQL platforms. For over two decades, developers, data analysts, and students have used this fictitious trading company to learn SQL, test query performance, practice data modeling, and build demo applications. northwind database download
The Northwind database has taught millions of people SQL and database design. Its simplicity hides realistic complexity, and its small size makes it fast for experimentation. Download it today—you’ll likely return to it for years in everything from quick syntax checks to full-fledged demo systems.
The Northwind database is a sample database that is widely used for testing and demonstrating database concepts. It is a fictional database that contains data for a company called Northwind Traders, which sells products to customers around the world. For a completely isolated environment: – On Linux
PostgreSQL port maintains proper serial (auto-increment) types and constraints.
-- Monthly sales trend SELECT YEAR(OrderDate) AS Year, MONTH(OrderDate) AS Month, SUM(od.UnitPrice * od.Quantity) AS Sales FROM Orders o JOIN [Order Details] od ON o.OrderID = od.OrderID GROUP BY YEAR(OrderDate), MONTH(OrderDate) ORDER BY Year, Month; In the world of database training, documentation, and
-- Employee sales performance SELECT e.FirstName, e.LastName, COUNT(o.OrderID) AS NumOrders, SUM(od.UnitPrice * od.Quantity) AS TotalSales FROM Employees e LEFT JOIN Orders o ON e.EmployeeID = o.EmployeeID LEFT JOIN [Order Details] od ON o.OrderID = od.OrderID GROUP BY e.EmployeeID, e.FirstName, e.LastName;
UPDATE Orders SET OrderDate = DATEADD(year, 25, OrderDate);