SET @StartDate = '2023-01-01';
SET @EndDate = '2023-01-27';
SELECT orderid, vol_oid, salesrep_customerid, orderstatus, orderdate FROM `orders` WHERE salesrep_customerid = 2451660
AND orderdate BETWEEN @StartDate AND @EndDate
AND orderstatus <> 'Cancelled';


--Select Productcode, Productname FROM Products_Joined WHERE Productname LIKE '%bosch%'
--Select categoryid FROM categories WHERE categoryname LIKE '%shop-vac%'
--Select categorydescription FROM categories WHERE categorydescription LIKE '%/Articles.asp?ID=248%' AND categoryid IN ()
--Select categoryid, categoryname FROM categories WHERE categoryname LIKE '%dremel%'
--Select categoryid, categoryname, parentid FROM categories WHERE categoryname LIKE '%skil%'
--Select productcode, productname, productdescription FROM Products_Joined WHERE ProductManufacturer LIKE '%waterway%'
--Select Productcode, Productname, vendor_partno FROM Products_Joined WHERE Productcode IN ()
--Select Productcode, Productname FROM Products_Joined WHERE photos_cloned_from = 'NO_PRODUCT_IMAGE'
--SELECT CategoryID, CategoryName, metatag_title, metatag_description, metatag_keywords FROM Categories WHERE CategoryName LIKE '%sebo%'
--Select categoryid, categoryname, categoryorder FROM categories WHERE categoryname LIKE '%sebo%'
--Select Productcode, Productname FROM Products_Joined WHERE photos_cloned_from = 'NO_PRODUCT_IMAGE' AND ProductManufacturer = 'homelite'
--Select productcode, productname, photos_cloned_from FROM Products_Joined WHERE ProductManufacturer LIKE '%dyson%'
--Select categoryid, Categoryname, FROM categories WHERE categoryname LIKE '%windsor%'
--Select categoryid, categoryorder FROM categories WHERE parentid = '243063'
--Select CategoryID, CategoryName, metatag_title, metatag_description, metatag_keywords FROM categories WHERE CategoryID IN
--Select Productcode, Productname, metatag_title, metatag_description, metatag_keywords FROM Products_Joined WHERE Productname LIKE '%amana%'
--Select categoryid, categorydescription_belowproducts From categories WHERE CategoryID IN ()
--SELECT ProductManufacturer, COUNT(*) AS MANF FROM Products_Joined GROUP BY ProductManufacturer
--Select Productcode, Productname, metatag_title, metatag_description, metatag_keywords FROM Products_Joined WHERE Productname LIKE '%bissell%'
--SELECT CustomerID, EmailAddress, EmailSubscriber FROM Customers WHERE Customer_IsAnonymous = 'Y' AND EmailSubscriber = 'N'
--SELECT CustomerID, EmailAddress, EmailSubscriber FROM Customers WHERE EmailSubscriber IS NULL
--SELECT EmailAddress, EmailSubscriber FROM Customers WHERE CustomerID = 1867738
--SELECT CustomerID, EmailAddress, EmailSubscriber FROM Customers WHERE EmailSubscriber = 'Y'
--SELECT c.CustomerID, MAX(c.EmailAddress) AS EMAIL, MAX(c.EmailSubscriber) AS Subscribe
--FROM Customers c 
--Join Orders o on c.CustomerID = o.CustomerID
--WHERE c.EmailSubscriber = 'Y', c.OrderStatus = 'Shipped' AND o.Order_Entry_System != 'Marketplace' AND c.EmailAddress NOT LIKE '%partswarehouse%'
--Group BY c.CustomerID
--SELECT CustomerID, EmailAddress FROM Customers WHERE CustomerID IN 
--SELECT CategoryID, CategoryDescription_BelowProducts FROM Categories WHERE CategoryDescription_BelowProducts LIKE '%pwmcrmkt%'
--Select CategoryID, CategoryName, metatag_title, metatag_description, metatag_keywords FROM categories WHERE Categoryname LIKE '%amana%'
--Select Productcode,  Productname, ProductPopularity, vendor_price, Google_Material FROM Products_Joined WHERE ProductManufacturer IN ('beam', 'marcone_electrolux', 'eureka_electrolux', 'sanitaire_electrolux', 'sanitaire', 'eureka_sanitaire', 'electrolux', 'eureka_electrolux_sanitaire', 'eureka')
--SELECT c.EmailAddress, c.EmailSubscriber, c.Customer_Notes
--FROM Customers c 
--Join Orders o on c.CustomerID = o.CustomerID
--WHERE c.EmailSubscriber = 'Y' AND o.Order_Entry_System != 'Marketplace' AND c.EmailAddress NOT LIKE '%partswarehouse%' AND c.Customer_Notes LIKE '%:::%'
--Select Productcode, Productname, ProductManufacturer, Google_Gender FROM Products_Joined WHERE ProductManufacturer = 'briggs_stratton'
--SELECT Productcode, Productname, vendor_price FROM Products_Joined WHERE productcode LIKE 'BSH-%'
--Select CategoryID, CategoryName FROM categories WHERE Categoryname LIKE '%GE%'
--SELECT procductcode, vendor_price FROM orderdetails OD JOIN Orders o ON
--Select Productcode, Productname,  metatag_title, metatag_description, metatag_keywords FROM Products_Joined WHERE Productcode IN ()
--SELECT CategoryID, categoryName FROM Categories WHERE Categoryname LIKE '%vapamore%'
--SELECT ProductCode, ProductName, ProductPopularity, SalePrice FROM Products_Joined WHERE ProductManufacturer = 'briggs_stratton'
--Select Productcode, Productname, metatag_title, metatag_description, metatag_keywords FROM Products_Joined WHERE Productname LIKE '%MTD%'
--SELECT categoryid, categoryname FROM categories where CategoryDescription_BelowProducts NOT LIKE '%https://models2.partswarehouse.com/categories/send.php%' AND CategoryDescription LIKE '%add_to_models_btn.gif%'
--Select categoryID, CategoryDescription_BelowProducts FROM categories WHERE Categoryname LIKE '%makita%'
--Select CategoryID, Categoryname FROM Categories WHERE categoryname LIKE '%bosch%' AND CategoryDescription LIKE '%add_to_models_btn.gif%'
--Select productcode, ProductName FROM Products_Joined WHERE ProductManufacturer LIKE '%echo%'
--Select productmanufacturer FROM products_joined GROUP BY productmanufacturer
--SELECT od.ProductCode, SUM(od.Quantity) AS TotalSold
--FROM OrderDetails od
--JOIN Orders o ON od.OrderID = o.OrderID
--WHERE o.orderstatus != 'Cancelled' 
--AND od.quantity <> 0
--GROUP BY od.ProductCode
--Select productcode, ProductName, vendor_price FROM Products_Joined WHERE ProductManufacturer LIKE '%worx%'
--Select CategoryID, Categoryname, categorydescription FROM Categories WHERE (Hidden != 'Y' OR Hidden IS NOT NULL) AND categoryname LIKE '%bosch%'
--Select CategoryID, Categoryname, categorydescription, CategoryDescriptionSHORT, metatag_title, metatag_description, metatag_keywords FROM Categories WHERE categoryname LIKE '%admiral%'
--Select productcode,book_isbn, vendor_partno FROM products_joined WHERE productcode IN 
--SELECT ProductCode, productprice, saleprice, google_material FROM Products_Joined WHERE ProductCode IN ('CR69A', 'CR79', 'CR99', 'CR9100', 'VC248', 'C-VC439')
--SELECT ProductCode, ProductDescription_AbovePricing, CustomField1 FROM Products_Joined WHERE ProductDescription_AbovePricing IS NOT NULL
--Select Productcode, Productname, metatag_title, metatag_description, metatag_keywords, vendor_partno, productmanufacturer, ProductDescription, ProductNameShort, Photo_AltText FROM Products_Joined WHERE productname LIKE '%Porter Cable%'
--SELECT ProductCode, IsChildofProductCode, vendor_partno FROM Products_Joined WHERE ProductCode = IsChildofProductCode
--Select productcode, ProductName, vendor_partno, ischildofproductcode, vendor_price, saleprice, productprice FROM Products_Joined WHERE productcode LIKE '%agr-%'
--Select categoryID, categoryname FROM categories WHERE Categoryname LIKE '%echo%'
--Select productcode, ProductName FROM Products_Joined WHERE Productmanufacturer LIKE '%tanaka%'
--SELECT od.ProductCode, od.OrderID, od.OrderDetailID, o.OrderDate, o.OrderStatus, od.Quantity, od.productNote FROM OrderDetails od JOIN Orders o ON od.OrderID = o.OrderID WHERE o.OrderStatus != 'Cancelled' AND od.Quantity > 0 AND od.ProductCode IN ()
--Select productcode, productname, photos_cloned_from FROM Products_Joined WHERE Productcode LIKE '%agr-%'
--SELECT categoryid, categoryname, categoryorder, parentid FROM categories WHERE categoryname LIKE '%tecumseh%'
--Select categoryID, categoryname, categoryorder FROM categories WHERE categoryname LIKE '%turf power%'
--Select categoryID, categoryname, categorydescription FROM categories WHERE categoryid IN ()
--Select CategoryID, CategoryName FROM categories WHERE Categoryname LIKE '%makita%'
--Select CategoryID, CategoryName, categorydescription FROM categories WHERE Categoryid IN ()
--Select productcode, ProductName, Photos_Cloned_From FROM Products_Joined WHERE Productcode LIKE '%pln-%'
--SELECT categoryid, categoryname, categorydescription_belowprodcuts FROM categories WHERE categoryname LIKE '%MTD%', OR '%yard machines%', OR '%yard man%', OR '%bolens%' ()
--Select productcode, ProductName, vendor_partno, ischildofproductcode FROM Products_Joined WHERE productcode LIKE '%bsh-%'
--Select productcode, vendor_price, ischildofproductcode FROM products_joined WHERE productname LIKE '%bissell%'
--Select productcode, ischildofproductcode FROM products_joined WHERE ProductManufacturer LIKE '%husqvarna%'
--Select CategoryID, categoryname FROM categories WHERE Categoryname LIKE '%GE %'
--Select productcode FROM products_joined WHERE productcode LIKE '%bro-%'
--Select productcode, Inv_Verify_QtyOnHand, ischildofproductcode, vendor_partno FROM products_joined WHERE productcode LIKE '%mtd%'
--OR CategoryName LIKE '%Belknap%'
--OR CategoryName LIKE '%Big O%'
--Select productcode, Inv_Verify_QtyOnHand, Quickbooks_Item_AssetAccnt, Quickbooks_Item_CogsAccnt, vendor_partno, ischildofproductcode, upc_code, ean, vendor_price, saleprice, productprice, google_material FROM products_joined WHERE Quickbooks_Item_CogsAccnt IN (
--Select categoryid, parentid, categoryname FROM categories WHERE categoryid IN ()
--Select productcode, ProductManufacturer, productname FROM products_joined WHERE ProductManufacturer LIKE '%agri-fab%'
--SELECT SUM(od.Quantity*od.Vendor_Price) AS Total FROM OrderDetails od JOIN Orders o ON od.OrderID = o.OrderID WHERE OrderDate > 10/13/2018 AND od.google_gender LIKE '%yard%' AND OrderStatus != 'Cancelled'
--Select CategoryID, parentid, Categoryname, categorydescription, categoryorder, CategoryDescriptionSHORT, Link_Title_Tag, CategoryDescription_BelowProducts, metatag_title, metatag_description, metatag_keywords FROM Categories WHERE categoryid IN ()
--Select CategoryID, Categoryname FROM Categories WHERE LastModified BETWEEN '11/10/2019' AND '11/12/2019'
--SELECT categoryid, SubCategory_DisplayMode1_Responsive, SubCategory_DisplayMode2_Responsive, categoryname FROM categories WHERE categoryid IN ()
--Select categoryid, categoryname, parentid, CategoryDescription_BelowProducts FROM categories WHERE parentid IN ('256429')
--Select CategoryID, parentid, Categoryname, categoryorder, categorydescription, CategoryDescriptionSHORT, Link_Title_Tag, CategoryDescription_BelowProducts, metatag_title, metatag_description, metatag_keywords FROM Categories WHERE categoryname LIKE '%kirkland%'
--Select orderid FROM orderdetails WHERE orderid > 2800000 GROUP BY orderid HAVING count(orderdetailID) = 1
--Select tn.trackingnumber, od.orderid, od.productcode FROM trackingnumbers tn JOIN OrderDetails od ON tn.OrderID = od.OrderID JOIN (Select orderid FROM orderdetails WHERE orderid > 2800000 GROUP BY orderid HAVING count(orderdetailID) = 1) AS orders ON od.orderID = orders.orderID WHERE od.productnote LIKE '%marc%' AND od.productnote LIKE '%ds %' AND od.quantity = 1 AND tn.trackingnumber NOT LIKE '%-%'
--SELECT pj.ProductCode as ProductCode, MAX(od.ProductName) as Name, MAX(pj.Quickbooks_Item_CogsAccnt) as COGS,  SUM (od.Quantity*od.ProductPrice) AS Income, SUM(od.Quantity*od.Vendor_Price) AS Expense, SUM (od.Quantity*(od.ProductPrice - od.Vendor_Price))AS TotalProfit, SUM(od.Quantity) AS TotalSold, MAX(pj.ProductPopularity) AS Popularity 
--FROM OrderDetails od
--JOIN Products_Joined pj ON od.ProductCode = pj.ProductCode
--JOIN Orders o ON od.OrderID = o.OrderID
--WHERE od.ProductNote IS NOT NULL
--AND od.ProductNote NOT LIKE ('%cancel%')
--AND od.ProductNote NOT LIKE ('%NLA%')
--AND od.ProductNote NOT LIKE ('%return%')
--AND o.OrderStatus NOT LIKE ('%Cancel%')
--AND o.Order_Entry_System NOT LIKE ('MarketPlace')
--AND pj.ProductManufacturer= 'mtd'
--GROUP BY pj.ProductCode
--UPDATE Products_Joined SET ProductManufacturer = 'pentair_sta-rite' WHERE ProductManufacturer = 'sta-rite'
--Select productcode, ischildofproductcode, productname FROM products_joined WHERE productcode IN ()
--Select productcode, ProductDescription_AbovePricing, ischildofproductcode FROM products_joined WHERE productcode IN ()
--Select CategoryID, Categoryname, CategoryDescription FROM Categories WHERE categoryid IN ()
--Select productcode, Productname FROM Products_Joined WHERE ProductManufacturer LIKE '%hydro_gear%'
--Select productcode, ProductName, ischildofproductcode FROM Products_Joined WHERE google_gender LIKE '%appliance%'
--Select categoryid, categoryname FROM categories WHERE categoryname LIKE '%BlackMax%' OR categoryname LIKE '%CORE%' OR categoryname LIKE '%County Line%' OR categoryname LIKE '%Remington%' OR categoryname LIKE '%Craftsman%' OR categoryname LIKE '%RoboMow%' OR categoryname LIKE '%Hyper Tough%' OR categoryname LIKE '%Platinum%' OR categoryname LIKE '%Columbia%' OR categoryname LIKE '%MTD OHV Engines%' OR categoryname LIKE '%Simplicity%' OR categoryname LIKE '%Snapper%' OR categoryname LIKE '%Wizard%' OR categoryname LIKE '%Murray%' OR categoryname LIKE '%White Outdoor%' OR categoryname LIKE '%TrimmerPlus%' OR categoryname LIKE '%Yard Machines%' OR categoryname LIKE '%Yard Man%' OR categoryname LIKE '%Servistar%'
--Select productcode, ProductWeight FROM Products_Joined WHERE ProductWeight = '0'
--SELECT * FROM OrderDetails WHERE ProductCode IN (')
--SELECT o.OrderDate, od.ProductCode, od.Quantity FROM OrderDetails od JOIN Orders o ON od.OrderID = od.OrderID WHERE od.ProductCode IN () AND od.Quantity > 0
--Select categoryid, categoryname FROM categories WHERE categoryid IN ()
--SELECT ProductManufacturer, MAX(Google_Gender) AS Highest, MIN(Google_Gender) AS Lowest FROM Products_Joined GROUP BY ProductManufacturer
--Select CategoryID, Categoryname, categorydescription, CategoryDescriptionSHORT, metatag_title, metatag_description, metatag_keywords FROM Categories WHERE categoryid IN ()
--Select productcode, ProductDescription_AbovePricing FROM Products_Joined WHERE Productcode IN (
--Select CategoryID, Categoryname, CategoryDescription_BelowProducts FROM Categories WHERE categoryname LIKE '%amana%'
--Select productcode, productname, ischildofproductcode FROM Products_Joined WHERE productcode IN ()
--Select productcode, ischildofproductcode, Inv_Verify_QtyOnHand, Quickbooks_Item_CogsAccnt, vendor_partno, upc_code, ean, vendor_price, saleprice, productprice, google_material FROM products_joined WHERE productcode IN ()
--Select productcode, vendor_partno, upc_code, ean, Inv_Verify_QtyOnHand FROM products_joined WHERE google_gender LIKE '%pool%'
--Select productcode, ischildofproductcode, Inv_Verify_QtyOnHand, productname, vendor_partno FROM products_joined WHERE vendor_partno IN ()
--Select productcode, ProductDescription_AbovePricing FROM products_joined WHERE productcode IN ()
--Select ProductManufacturer FROM products_joined WHERE google_gender LIKE '%vacuum%'
--Select od.productcode, od.quantity, od.productprice, od.productname FROM orderdetails od JOIN Orders o ON o.OrderID = od.OrderID WHERE o.orderstatus != 'Cancel' AND od.Productcode IN (
--Select * FROM orderdetails WHERE OrderdetailID IN ()
--Select categoryid, categoryname FROM categories WHERE parentid IN (159252)
--Select categoryid, categoryname, categorydescription FROM categories WHERE categoryname LIKE '%estate%'
--Select CategoryID, Categoryname, CategoryDescription_BelowProducts FROM Categories WHERE categoryname LIKE '%greenmachine%'
--Select productcode, ischildofproductcode, ProductDescriptionShort FROM products_joined WHERE  ischildofproductcode IS NOT NULL AND ProductDescriptionShort LIKE '%Replaces%'
--Select categoryid, categoryname, categorydescription FROM categories WHERE categoryname LIKE '%Kelvinator%'
--Select CategoryID, parentid, Categoryname, CategoryDescription_BelowProducts FROM Categories WHERE categoryname LIKE '%norge%'
--Select Trackingnumber
--from trackingnumbers
--where trackingnumber not like '%-%'
--AND (form like '%marc-%' or form like '%hrz-%')
--Select productcode, vendor_price, saleprice, productprice FROM products_joined WHERE productcode IN ()
--Select categoryid, categoryname, CategoryDescription FROM categories WHERE categoryname LIKE '%Hotpoint%'
--Select productcode, Google_Unique_Identifier_Exists, AddtoCartBtn_Replacement_Text, ischildofproductcode FROM Products_Joined WHERE ProductManufacturer = 'shop-vac' AND (DiscountedRecurringPrice_Level3 IS NULL OR DiscountedRecurringPrice_Level3 = '' OR DiscountedRecurringPrice_Level3  = 0) AND (ischildofproductcode = '' OR ischildofproductcode IS NULL)
--Select categoryid, categoryname, CategoryDescription_BelowProducts FROM categories WHERE categoryname LIKE '%amana%'
--SELECT o.OrderDate, MAX(p.ProductCode) AS ProductCode, MAX(p.ProductName) AS Name, SUM(od.TotalPrice) AS TotalPrice, SUM(od.Quantity) AS TotalQuanitity, SUM(od.Vendor_price) AS TotalCost FROM OrderDetails od JOIN Orders o ON o.orderid=od.orderid JOIN Products p On od.ProductCode=p.ProductCode WHERE o.OrderDate BETWEEN '11/24/2020 12:00 AM' AND '12/09/2020 11:59 PM' AND p.ProductName LIKE '%Homelite%' AND o.OrderStatus != 'Cancelled' GROUP BY o.OrderDate ORDER BY o.OrderDate DESC
--Select productcode, productmanufacturer, Productname FROM products_joined WHERE productcode LIKE '%Pro-%'
--Select tn.trackingnumber, od.orderid, od.productcode FROM trackingnumbers tn JOIN OrderDetails od ON tn.OrderID = od.OrderID JOIN (Select orderid FROM orderdetails WHERE orderid > 3000000 AND ProductCode NOT LIKE 'DSC%' GROUP BY orderid HAVING count(orderdetailID) = 1) AS orders ON od.orderID = orders.orderID JOIN Products_Joined pj ON od.ProductCode = pj.ProductCode WHERE  pj.custom_label_3 LIKE '%MRC%' AND od.quantity = 1 AND tn.form IS NULL AND tn.trackingnumber NOT LIKE '%-%'
--SELECT orderdetailid, productcode, quantity, productprice, shipdate, vendor_price FROM OrderDetails od JOIN Orders o ON od.OrderID = o.OrderID WHERE od.ProductCode = 'DY-911236-01'
--Select Productcode, productname, ProductNameShort, Photo_AltText, METATAG_Title, METATAG_Description, METATAG_Keywords FROM Products_Joined WHERE productmanufacturer LIKE '%skil%'
--Select categoryid, categorydescription FROM categories WHERE categoryid IN ()
--Select productcode, Photos_Cloned_From, productname, Inv_Verify_QtyOnHand, StockLowQtyAlarm, Quickbooks_Item_CogsAccnt, Quickbooks_Item_AssetAccnt, google_material, Google_Size FROM products_joined WHERE Photos_Cloned_From IS NOT NULL AND google_material IS NOT NULL
--Select productcode, productname, vendor_partno, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm, Quickbooks_Item_CogsAccnt, Quickbooks_Item_AssetAccnt, Photos_Cloned_From, google_material, Google_Size FROM products_joined WHERE productcode IN ()
--Select categoryid, categoryname, CategoryDescription FROM categories WHERE categoryid IN ()
--Select productcode, productname, google_gender, productmanufacturer, ProductNameShort, Photo_AltText, METATAG_Description, METATAG_Keywords, METATAG_Title FROM Products_Joined WHERE productmanufacturer LIKE '%bosch%'
--SELECT * FROM Orderdetails WHERE productcode IN ()
--Select categoryid, Categoryname, CategoryDescription, CategoryDescription_BelowProducts FROM categories WHERE categoryid IN ()
--Select Productcode, Inv_Verify_QtyOnHand, ischildofproductcode, vendor_price FROM Products_Joined WHERE productmanufacturer LIKE '%rockwell%' OR productmanufacturer LIKE '%worx%'
--Select * FROM Trackingnumbers WHERE orderid IN ()
--Select productcode, vendor_partno, vendor_price, ischildofproductcode FROM products_joined WHERE google_gender LIKE '%appliance%'
--SELECT * FROM OrderDetails WHERE ProductNote LIKE '%| UED%' AND OrderDetailID IN 
--Select categoryid, Categoryname, CategoryDescription FROM categories WHERE categoryname LIKE '%GE %'
--SELECT ProductManufacturer FROM Products_Joined GROUP BY ProductManufacturer
--SELECT * FROM OrderDetails WHERE OrderID IN (SELECT OrderID FROM OrderDetails WHERE ProductCode LIKE 'SAM-%') AND OrderDetailID > 5571461
--SELECT categoryname, categoryid, categorydescription FROM categories WHERE categoryname LIKE '%core%'
--Select categoryid, Categoryname, CategoryDescription FROM categories WHERE categoryid IN ()
--Select * FROM Customers WHERE emailaddress IN ()
--Select categoryid, CategoryDescription FROM categories WHERE categoryid IN ()
--Select * FROM orderdetails WHERE qtyonhold > 0 AND productnote LIKE '%MRC%SPC%'
--Select productcode, productname, ischildofproductcode, Photos_Cloned_From, productmanufacturer FROM products_joined WHERE productmanufacturer LIKE '%bosch%'
--Select productcode, custom_label_2 FROM Products_Joined WHERE custom_label_2 IS NOT NULL
--Select productcode, vendor_partno, vendor_price, ischildofproductcode, ned WHERE custom_label_2 IS NOT NULL
--SELECT * FROM ORDERS WHERE OrderID IN (
--Select productcode, productname, ischildofproductcode, productmanufacturer, Photos_Cloned_From FROM products_joined WHERE productmanufacturer LIKE '%whirlpool%'
--Select productcode, productname, ischildofproductcode, Photos_Cloned_From, productmanufacturer, ProductDescription_AbovePricing FROM products_joined WHERE productcode IN ()
--SELECT productcode, Photos_Cloned_From, productname, productdescription, google_product_category, google_product_type FROM  products_joined WHERE productcode IN ()
--SELECT productcode, Photos_Cloned_From, productname, productdescription FROM products_joined WHERE productcode IN ()
--SELECT productcode, productname, productdescription, vendor_price FROM  products_joined WHERE productcode IN ()
--SELECT productcode, ischildofproductcode FROM products_joined WHERE productcode IN ('0104053','0159155')
--SELECT productcode, productname, vendor_price FROM  products_joined WHERE productmanufacturer LIKE '%briggs_stratton%'
--SELECT productcode,  productname, Photos_Cloned_From FROM products_joined WHERE productmanufacturer LIKE '%dewalt%'
--SELECT FirstName, City, State, EmailAddress FROM Customers WHERE  EmailAddress IN ('synari@aol.com',
--SELECT productcode, IsChildOfProductCode, UPC_code, EAN FROM products_joined WHERE productmanufacturer LIKE '%kirby%'
--SELECT productcode, IsChildOfProductCode FROM products_joined WHERE google_gender LIKE '%appliance%'
--SELECT productcode, productname, google_size FROM products_joined WHERE productcode IN ()
--SELECT productcode, productname, mpn FROM products_joined WHERE productcode IN ()
--SELECT productcode, productname, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm, vendor_partno  FROM products_joined WHERE productcode IN ()
--SELECT productcode, productname, Google_Material, SalePrice, ProductPrice FROM products_joined WHERE Google_Material LIKE '%MAP%'
--SELECT productcode, productname, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm  FROM products_joined WHERE  ischildofproductcode LIKE '%FNLA%'
--SELECT productcode, productname, ischildofproductcode, Photos_Cloned_From FROM products_joined WHERE productcode IN ()
--SELECT productcode, productname, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm, vendor_partno  FROM products_joined WHERE vendor_partno IN ()
--Select productcode, productname, HideProduct, ischildofproductcode, photos_cloned_from FROM products_joined WHERE productmanufacturer LIKE '%Briggs_Stratton%'
--Select productcode, productname, HideProduct, ischildofproductcode, photos_cloned_from FROM products_joined WHERE google_gender LIKE '%appliance%'
--Select productcode, productmanufacturer FROM products_joined WHERE productcode LIKE '%bs-%'
--Select productcode, productname, Vendor_Price, ischildofproductcode FROM products_joined WHERE productmanufacturer LIKE '%walbro%'
--SELECT productcode, productname, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm, vendor_partno FROM products_joined WHERE vendor_partno IN ()
--Select Productcode, ProductManufacturer FROM Products_Joined WHERE ProductManufacturer LIKE '%marcone_electrolux_frigidaire%' ORDER BY CreatedDate desc
--Select productcode, ProductName, ischildofproductcode, photos_cloned_from FROM Products_Joined WHERE productmanufacturer LIKE '%Marcone_fisher_paykel%'
--Select productcode, ProductName, ischildofproductcode, photos_cloned_from FROM Products_Joined WHERE productmanufacturer LIKE '%danby%' AND ischildofproductcode IS NULL AND photos_cloned_from = 'NO_PRODUCT_IMAGE' ORDER BY CreatedDate desc
--Select productcode, productname, Vendor_Price, ischildofproductcode FROM products_joined WHERE productmanufacturer LIKE '%walbro%' AND custom_label_3 LIKE '%PWD%'
--Select productcode, productname, Vendor_Price, ischildofproductcode, MPN FROM products_joined WHERE productmanufacturer LIKE 'ego-%'
--Select productcode, productname, Vendor_Price, ischildofproductcode, vendor_partno, MPN FROM products_joined WHERE productcode LIKE 'ego-%'
--SELECT productcode, productname, ischildofproductcode, Inv_Verify_QtyOnHand, StockLowQtyAlarm, vendor_partno FROM products_joined WHERE productcode IN ()
--Select Productcode, ProductManufacturer FROM Products_Joined WHERE ProductManufacturer LIKE '%Marcone_fisher_paykel%' ORDER BY CreatedDate desc
--Select productmanufacturer FROM Products_Joined WHERE google_gender LIKE '%vacuum%' AND (IsChildOfProductCode IS NULL OR IsChildOfProductCode = '') AND (HideProduct IS NULL OR HideProduct != 'Y') group by productmanufa--cturer
--Select productcode, google_size FROM products_joined WHERE google_size IN ()
--Select productcode, vendor_price, saleprice, productprice, Quickbooks_Item_CogsAccnt, Quickbooks_Item_AssetAccnt, IsChildOfProductCode FROM products_joined WHERE productcode IN ()
--Select productcode, IsChildOfProductCode FROM products_joined WHERE productcode IN ()
--SELECT productcode, IsChildOfProductCode, Vendor_Price FROM products_joined WHERE Vendor_Price <= '0.01' and productmanufacturer LIKE '%marcone%'
--Select productcode, custom_label_3 from products_joined where productid between  500001 AND 1000000
--Select p.Quickbooks_Item_CogsAccnt, SUM(od.quantity) as QTY
--FROM Orders o JOIN OrderDetails od  ON o.orderid=od.orderid JOIN products_joined p On od.ProductCode=p.ProductCode
--WHERE p.vendor_partno LIKE 'PWD-%' OR custom_label_3 LIKE '%PWD%'
--AND o.OrderStatus != 'Cancelled'
--AND o.orderdate > '12/15/2021'
--GROUP BY p.Quickbooks_Item_CogsAccnt

--SELECT CategoryID, CategoryDescription, CategoryName
--FROM Categories
--WHERE CategoryID NOT IN (SELECT ParentID FROM Categories WHERE ParentID != '')
--AND Hidden <> 'y'

--SELECT c1.CategoryID
--FROM Categories c1
--JOIN Categories c2 ON c1.CategoryID = c2.CategoryID
--WHERE c1.CategoryDescription LIKE 'add_to_models_btn.gif'
--AND c2.ParentID <> ''
--AND c1.Hidden <> 'y'
--AND c1.Category in ()

--SELECT QB_ID, QB_Title, QB_Query
--FROM QueryBank 
--WHERE QB_ID IN ('2324', '2912')
