-- MySQL dump 10.13  Distrib 8.0.30, for macos12 (x86_64)
--
-- Host: localhost    Database: zagi_warehouse
-- ------------------------------------------------------
-- Server version	8.0.30

/*!40101 SET @OLD_CHARACTER_SET_CLIENT=@@CHARACTER_SET_CLIENT */;
/*!40101 SET @OLD_CHARACTER_SET_RESULTS=@@CHARACTER_SET_RESULTS */;
/*!40101 SET @OLD_COLLATION_CONNECTION=@@COLLATION_CONNECTION */;
/*!50503 SET NAMES utf8 */;
/*!40103 SET @OLD_TIME_ZONE=@@TIME_ZONE */;
/*!40103 SET TIME_ZONE='+00:00' */;
/*!40014 SET @OLD_UNIQUE_CHECKS=@@UNIQUE_CHECKS, UNIQUE_CHECKS=0 */;
/*!40014 SET @OLD_FOREIGN_KEY_CHECKS=@@FOREIGN_KEY_CHECKS, FOREIGN_KEY_CHECKS=0 */;
/*!40101 SET @OLD_SQL_MODE=@@SQL_MODE, SQL_MODE='NO_AUTO_VALUE_ON_ZERO' */;
/*!40111 SET @OLD_SQL_NOTES=@@SQL_NOTES, SQL_NOTES=0 */;

--
-- Table structure for table `calendar`
--

DROP TABLE IF EXISTS `calendar`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `calendar` (
  `calendar_key` int NOT NULL AUTO_INCREMENT,
  `full_date` date DEFAULT NULL,
  `day_of_week` varchar(9) DEFAULT NULL,
  `day_of_month` int DEFAULT NULL,
  `month` int DEFAULT NULL,
  `qtr` int DEFAULT NULL,
  `year` int DEFAULT NULL,
  PRIMARY KEY (`calendar_key`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `calendar`
--

LOCK TABLES `calendar` WRITE;
/*!40000 ALTER TABLE `calendar` DISABLE KEYS */;
INSERT INTO `calendar` VALUES (1,'2023-01-23','Monday',23,1,1,2023),(2,'2023-02-06','Monday',6,2,1,2023),(3,'2023-03-14','Tuesday',14,3,1,2023),(4,'2023-04-17','Monday',17,4,2,2023),(5,'2023-05-01','Monday',1,5,2,2023),(6,'2023-06-07','Wednesday',7,6,2,2023),(7,'2023-06-19','Monday',19,6,2,2023);
/*!40000 ALTER TABLE `calendar` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `customer`
--

DROP TABLE IF EXISTS `customer`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `customer` (
  `customer_key` int NOT NULL AUTO_INCREMENT,
  `customer_id` varchar(7) DEFAULT NULL,
  `customer_name` varchar(32) DEFAULT NULL,
  `customer_zip` int DEFAULT NULL,
  `customer_gender` varchar(6) DEFAULT NULL,
  `customer_marital_status` varchar(7) DEFAULT NULL,
  `customer_education_level` varchar(16) DEFAULT NULL,
  `customer_credit_score` int DEFAULT NULL,
  PRIMARY KEY (`customer_key`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `customer`
--

LOCK TABLES `customer` WRITE;
/*!40000 ALTER TABLE `customer` DISABLE KEYS */;
INSERT INTO `customer` VALUES (1,'1-2-333','Tina',60137,'Female','Single','College',700),(2,'2-3-444','Tony',60611,'Male','Single','High School',650),(3,'3-4-555','Pam ',35401,'Female','Marred','College',623);
/*!40000 ALTER TABLE `customer` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `product`
--

DROP TABLE IF EXISTS `product`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `product` (
  `product_key` int NOT NULL AUTO_INCREMENT,
  `product_id` varchar(3) DEFAULT NULL,
  `product_name` varchar(32) DEFAULT NULL,
  `product_price` double DEFAULT NULL,
  `product_vendor_name` varchar(32) DEFAULT NULL,
  `product_category_name` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`product_key`)
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `product`
--

LOCK TABLES `product` WRITE;
/*!40000 ALTER TABLE `product` DISABLE KEYS */;
INSERT INTO `product` VALUES (1,'1X1','Zzz Bag',100,'Pacifica Gear','Camping'),(2,'2X2','Easy Boot',70,'Mountain King','Footwear'),(3,'3X3','Cosy Sock',15,'Mountain King','Footwear'),(4,'4X4','Dura Boot',90,'Pacifica Gear','Footwear'),(5,'5X5','Tiny Tent',150,'Mountain King','Camping'),(6,'6X6','Biggy Tent',250,'Mountain King','Camping');
/*!40000 ALTER TABLE `product` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales`
--

DROP TABLE IF EXISTS `sales`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales` (
  `calendar_key` int DEFAULT NULL,
  `store_key` int DEFAULT NULL,
  `product_key` int NOT NULL,
  `customer_key` int DEFAULT NULL,
  `tid` varchar(8) NOT NULL,
  `time_of_day` time DEFAULT NULL,
  `dollars_sold` double DEFAULT NULL,
  `units_sold` int DEFAULT NULL,
  PRIMARY KEY (`product_key`,`tid`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales`
--

LOCK TABLES `sales` WRITE;
/*!40000 ALTER TABLE `sales` DISABLE KEYS */;
INSERT INTO `sales` VALUES (1,1,1,1,'T111',NULL,100,1),(3,2,1,1,'T333',NULL,100,1),(5,2,1,1,'T555',NULL,400,4),(7,3,1,3,'T777',NULL,200,2),(2,2,2,2,'T222',NULL,70,1),(4,1,2,3,'T444',NULL,140,2),(3,2,3,1,'T333',NULL,75,5),(4,1,4,3,'T444',NULL,90,1),(5,2,5,1,'T555',NULL,300,2),(5,2,6,1,'T555',NULL,250,1),(6,2,6,2,'T666',NULL,750,3);
/*!40000 ALTER TABLE `sales` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales_per_dcs`
--

DROP TABLE IF EXISTS `sales_per_dcs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales_per_dcs` (
  `calendar_key` int NOT NULL,
  `store_key` int NOT NULL,
  `customer_key` int NOT NULL,
  `dollars_sold` double DEFAULT NULL,
  `units_sold` int DEFAULT NULL,
  `line_count` int DEFAULT NULL,
  PRIMARY KEY (`calendar_key`,`store_key`,`customer_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales_per_dcs`
--

LOCK TABLES `sales_per_dcs` WRITE;
/*!40000 ALTER TABLE `sales_per_dcs` DISABLE KEYS */;
INSERT INTO `sales_per_dcs` VALUES (1,1,1,100,1,1),(2,2,2,70,1,1),(3,2,1,175,6,2),(4,1,3,230,3,2),(5,2,1,950,7,3),(6,2,2,750,3,1),(7,3,3,200,2,1);
/*!40000 ALTER TABLE `sales_per_dcs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `sales_per_dpcs`
--

DROP TABLE IF EXISTS `sales_per_dpcs`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `sales_per_dpcs` (
  `calendar_key` int NOT NULL,
  `store_key` int NOT NULL,
  `product_key` int NOT NULL,
  `customer_key` int NOT NULL,
  `dollars_sold` double DEFAULT NULL,
  `units_sold` int DEFAULT NULL,
  `line_count` int DEFAULT NULL,
  PRIMARY KEY (`calendar_key`,`store_key`,`product_key`,`customer_key`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `sales_per_dpcs`
--

LOCK TABLES `sales_per_dpcs` WRITE;
/*!40000 ALTER TABLE `sales_per_dpcs` DISABLE KEYS */;
INSERT INTO `sales_per_dpcs` VALUES (1,1,1,1,100,1,1),(2,2,2,2,70,1,1),(3,2,1,1,100,1,1),(3,2,3,1,75,5,1),(4,1,2,3,140,2,1),(4,1,4,3,90,1,1),(5,2,1,1,400,4,1),(5,2,5,1,300,2,1),(5,2,6,1,250,1,1),(6,2,6,2,750,3,1),(7,3,1,3,200,2,1);
/*!40000 ALTER TABLE `sales_per_dpcs` ENABLE KEYS */;
UNLOCK TABLES;

--
-- Table structure for table `store`
--

DROP TABLE IF EXISTS `store`;
/*!40101 SET @saved_cs_client     = @@character_set_client */;
/*!50503 SET character_set_client = utf8mb4 */;
CREATE TABLE `store` (
  `store_key` int NOT NULL AUTO_INCREMENT,
  `store_id` varchar(2) DEFAULT NULL,
  `store_zip` int DEFAULT NULL,
  `store_region_name` varchar(16) DEFAULT NULL,
  `store_size` int DEFAULT NULL,
  `store_c_system` varchar(16) DEFAULT NULL,
  `store_layout` varchar(16) DEFAULT NULL,
  PRIMARY KEY (`store_key`)
) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
/*!40101 SET character_set_client = @saved_cs_client */;

--
-- Dumping data for table `store`
--

LOCK TABLES `store` WRITE;
/*!40000 ALTER TABLE `store` DISABLE KEYS */;
INSERT INTO `store` VALUES (1,'S1',60600,'Chicagoland',51000,'Cashiers','Modern'),(2,'S2',60605,'Chicagoland',35000,'Self Service','Traditional'),(3,'S3',35400,'Tristate',55000,'Mixed','Traditional');
/*!40000 ALTER TABLE `store` ENABLE KEYS */;
UNLOCK TABLES;
/*!40103 SET TIME_ZONE=@OLD_TIME_ZONE */;

/*!40101 SET SQL_MODE=@OLD_SQL_MODE */;
/*!40014 SET FOREIGN_KEY_CHECKS=@OLD_FOREIGN_KEY_CHECKS */;
/*!40014 SET UNIQUE_CHECKS=@OLD_UNIQUE_CHECKS */;
/*!40101 SET CHARACTER_SET_CLIENT=@OLD_CHARACTER_SET_CLIENT */;
/*!40101 SET CHARACTER_SET_RESULTS=@OLD_CHARACTER_SET_RESULTS */;
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;

-- Dump completed on 2023-04-17 14:59:50
