In this repository, we will use this fictitious database of Worldwide importers to practice SQL problems.
worldwide importers sample database information- https://learn.microsoft.com/en-us/sql/samples/wide-world-importers-what-is?view=sql-server-ver16
Data dictionary link https://dataedo.com/samples/html/WideWorldImporters/doc/WideWorldImporters_5/home.html
Workflow of the business
-
WWI creates purchase orders and submits the orders to the suppliers.
-
Suppliers send the items, WWI receives them and stocks them in their warehouse.
-
Customers order items from WWI
-
WWI fills the customer order with stock items in the warehouse, and when they don't have sufficient stock, they order the additional stock from the suppliers.
-
Some customers don't want to wait for items that aren't in stock. If they order say five different stock items, and four are available, they want to receive the four items and backorder the remaining item. The item would then be sent later in a separate shipment.
-
WWI invoices customers for the stock items, typically by converting the order to an invoice.
-
Customers might order items that aren't in stock. These items are backordered.
-
WWI delivers stock items to customers either via their own delivery vans, or via other couriers or freight methods.
-
Customers pay invoices to WWI.
-
Periodically, WWI pays suppliers for items that were on purchase orders. This is often sometime after they've received the goods.
Steps to use repository for your practice
- Create 6 customized tables in your worldwideimporters database. These tables are Dbo.Orders, Dbo.OrderLines, Dbo.Customers, Dbo.Invoices, Dbo.InvoiceLines and Dbo.StockItems.
- Code to create tables is present in file named 'step_1_create_your_custom_tables'
- Description of fields present in custom details are available in the file named 'step_2_Column_description_for_the_custom_tables'
- Start with beginner problems present in file- '60 solved SQL problems for beginners'.
- After this you can work on '26 solved intermediate SQL problems'