{"id":17174,"date":"2020-06-19T22:56:23","date_gmt":"2020-06-20T02:56:23","guid":{"rendered":"http:\/\/bangla.salearningschool.com\/recent-posts\/generate_price_calculation_data-2\/"},"modified":"2020-06-20T13:25:05","modified_gmt":"2020-06-20T17:25:05","slug":"generate_price_calculation_data-2","status":"publish","type":"post","link":"http:\/\/bangla.sitestree.com\/?p=17174","title":{"rendered":"generate_price_calculation_data"},"content":{"rendered":"<p>\/****** Object: StoredProcedure [dbo].[generate_price_calculation_data] Script Date: 2020-06-19 10:15:42 PM ******\/<br \/>\nSET ANSI_NULLS ON<br \/>\nGO<br \/>\nSET QUOTED_IDENTIFIER ON<br \/>\nGO<br \/>\nremove-this-phrase&#8211; =============================================<br \/>\nremove-this-phrase&#8211; Author: &lt;Author,,Name&gt;<br \/>\nremove-this-phrase&#8211; Create date: &lt;Create Date,,&gt;<br \/>\nremove-this-phrase&#8211; Description:\t&lt;Description,,&gt;<br \/>\nremove-this-phrase&#8211; =============================================<br \/>\nCREATE PROCEDURE [dbo].[generate_price_calculation_data]<br \/>\nAS<br \/>\nBEGIN<br \/>\nremove-this-phrase&#8211; Visibility status<br \/>\nSELECT [Product ID] as product_id<br \/>\n,[Model Code] as sku<br \/>\n,[Full Product Name] as [Name]<br \/>\n, as _category<br \/>\n, &#8216;All&#8217; as _root_category<br \/>\n,[1pc Price] as raw_price<br \/>\n,[1pc Cheapest Postal Shipping Price] as dummy<br \/>\n,[1pc Cheapest Express Courier Shipping Price] as cheapest_courier_shipping<br \/>\n,[EAN] as product_ean<br \/>\nremove-this-phrase&#8211;Ship Risk\tPrice Risk\tTotal\tRisk Return Total with ship\tReferral Fee\tPaypal Fees\tFinal Value Fee\tInsertion Fee HST\tEU Vat\tCurrency Risk\tshopforsoul_profit\tebay_profit\tIncome Tax\tshopforsoul_cost\tMLP\tSpecial List Price\tspecial_from_date\tspecial_to_date\tebay_cost\tebay_list_price\tBuyer pay from Mall\tEay Buyers Pay\tEbay vs Mall\tNA-1\tAmazon Final Value Fee\tamazon_profit\tamazon_our_cost\tamazon_list_price\tamazon_special_price\tAmazon Final Value Fee USD\tamazon_profit_usd\tamazon_our_cost_usd\tamazon_list_price_usd\tamazon_special_price_usd\tamazon_list_price_gbp\tamazon_special_price_gbp\tamazon_list_price_eu\tamazon_special_price_eu\tamazon_list_price_mxn\tamazon_special_price_mxn\tama_safe_refund_amount<br \/>\n,ROUND([1pc Cheapest Express Courier Shipping Price]*0.03,2) as ship_risk<br \/>\n,ROUND([1pc Price]*0.03,2) as price_risk<br \/>\nremove-this-phrase&#8211;,ROUND([1pc Price]+G2+I2+J2,2) as total<br \/>\n,ROUND([1pc Cheapest Express Courier Shipping Price]*0.2,2) as risk_return<br \/>\nremove-this-phrase&#8211;,ROUND(K2+L2;2) as total_with_shipping<br \/>\nremove-this-phrase&#8211;,ROUND(M2*0.1;2) as referral_fee<br \/>\nremove-this-phrase&#8211;,ROUND(0.3+M2*0.03;2) as paypal_fees<br \/>\nremove-this-phrase&#8211;,ROUND(M2*0.07;2) as final_value_fees<br \/>\nremove-this-phrase&#8211;,ROUND(M2*0.01;2) as insertion_fees<br \/>\nremove-this-phrase&#8211;,ROUND(M2*0.13;2) as HST<br \/>\nremove-this-phrase&#8211;,ROUND(M2*0.25;2) as eu_vat<br \/>\nremove-this-phrase&#8211; amazon_ca_minimum_price\tamazon_usd_minimum_price\tamazon_gbp_minimum_price\tamazon_eu_minimum_price\tamazon_mxn_minimum\tamazon_ca_abs_minimum\texpedited_cost<br \/>\n,[Soon Discontinued]<br \/>\n,[Weight Kg] * 2.2 as Weight<br \/>\n,[Height mm] as Height<br \/>\n,[Width mm] as Width<br \/>\n,[Depth mm] as Depth<br \/>\n,[Retail Price] as Retail_price<br \/>\n,[Stock status] as &quot;Stock status&quot;<br \/>\n,[Date Back]<br \/>\nremove-this-phrase&#8211;Weight right\tShip Right\tIs Normal<br \/>\nFROM [DealWithAmazonShopForSoul].[dbo].[supplier-data-jan-01-2019]<br \/>\nEND<br \/>\nGO<br \/>\n*** . *** *** . *** . *** . ***<\/p>\n<p><em><strong><em><strong>Training Courses: <\/strong><a href=\"http:\/\/training.sitestree.com\/\">http:\/\/Training.SitesTree.com<\/a> <\/em><br \/>\nBlog<\/strong>: <a href=\"http:\/\/bangla.salearningschool.com\/\">http:\/\/Bangla.SaLearningSchool.com<\/a>, <a href=\"http:\/\/sitestree.com\">http:\/\/SitesTree.com<\/a><\/em><br \/>\n<em><strong>8112223 Canada Inc\/Justetc<\/strong>: <a href=\"http:\/\/JustEtc.net\">http:\/\/JustEtc.net<\/a><\/em><br \/>\n<em>Youtube: <\/em><a href=\"https:\/\/www.youtube.com\/channel\/UCHrtq0pV8mEuTLGd2-Lp9ig\/playlists\">https:\/\/www.youtube.com\/channel\/UCHrtq0pV8mEuTLGd2-Lp9ig\/playlists<\/a><br \/>\n<em><strong>Medium: <\/strong><\/em><a href=\"https:\/\/medium.com\/@SayedAhmedCanada\">https:\/\/medium.com\/@SayedAhmedCanada<\/a><\/p>\n<p><em><\/em><br \/>\n<em><strong>Sayed Ahmed<\/strong><br \/>\n<\/em><br \/>\n<em><strong>BSc. Eng. in Comp. Sc. &amp; Eng. (BUET)<\/strong><\/em><br \/>\n<em><strong>MSc. in Comp. Sc. (U of Manitoba, Canada)<\/strong><\/em><br \/>\n<em><strong>MSc. in Data Science and Analytics (Ryerson University, Canada)<\/strong><\/em><br \/>\n<em><strong>Linkedin<\/strong>: <a href=\"https:\/\/ca.linkedin.com\/in\/sayedjustetc\">https:\/\/ca.linkedin.com\/in\/sayedjustetc<\/a><br \/>\n<\/em><\/p>\n<p><em><strong>Facebook Groups\/Forums to discuss (Q &amp; A): <\/strong><\/em><br \/>\n<a href=\"https:\/\/www.facebook.com\/salearningschool\/?ref=your_pages\">https:\/\/www.facebook.com\/salearningschool<\/a><\/p>\n<p><a href=\"https:\/\/www.facebook.com\/banglasalearningschool\">https:\/\/www.facebook.com\/banglasalearningschool<\/a><br \/>\n<a href=\"https:\/\/www.facebook.com\/justetcsocial\">https:\/\/www.facebook.com\/justetcsocial<\/a><\/p>\n<p><em>Get access to courses on Big Data, Data Science, AI, Cloud, Linux, System Admin, Web Development and Misc. related. Also, create your own course to sell to others. <\/em><a href=\"http:\/\/sitestree.com\/training\/\">http:\/\/sitestree.com\/training\/<\/a><\/p>\n<p><strong>Join, Discuss, and Thrive:<\/strong><br \/>\nFinance: <a href=\"https:\/\/www.facebook.com\/groups\/1792339521056034\">https:\/\/www.facebook.com\/groups\/1792339521056034<\/a><\/p>\n<p>Bangladesh and Canada: <a href=\"https:\/\/www.facebook.com\/groups\/398414183875009\">https:\/\/www.facebook.com\/groups\/398414183875009<\/a><\/p>\n<p>Bangladesh: IT &amp; Eng: Canada: <a href=\"https:\/\/www.facebook.com\/groups\/480297675634630\">https:\/\/www.facebook.com\/groups\/480297675634630<\/a><\/p>\n<p>BUETians in Ontario: <a href=\"https:\/\/www.facebook.com\/groups\/371982239854027\">https:\/\/www.facebook.com\/groups\/371982239854027<\/a><\/p>\n<p>Worldwide IT: <a href=\"https:\/\/www.facebook.com\/groups\/28362061867\">https:\/\/www.facebook.com\/groups\/28362061867<\/a><\/p>\n<p>JustEtc: <a href=\"https:\/\/www.facebook.com\/JustETC-Technologies-Inc-289864738261\">https:\/\/www.facebook.com\/JustETC-Technologies-Inc-289864738261<\/a><\/p>\n","protected":false},"excerpt":{"rendered":"<p>\/****** Object: StoredProcedure [dbo].[generate_price_calculation_data] Script Date: 2020-06-19 10:15:42 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase&#8211; ============================================= remove-this-phrase&#8211; Author: &lt;Author,,Name&gt; remove-this-phrase&#8211; Create date: &lt;Create Date,,&gt; remove-this-phrase&#8211; Description: &lt;Description,,&gt; remove-this-phrase&#8211; ============================================= CREATE PROCEDURE [dbo].[generate_price_calculation_data] AS BEGIN remove-this-phrase&#8211; Visibility status SELECT [Product ID] as product_id ,[Model Code] as sku ,[Full Product Name] as [Name] &hellip; <\/p>\n<p><a class=\"more-link btn\" href=\"http:\/\/bangla.sitestree.com\/?p=17174\">Continue reading<\/a><\/p>\n","protected":false},"author":2,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_jetpack_memberships_contains_paid_content":false,"footnotes":""},"categories":[1915,1914],"tags":[],"class_list":["post-17174","post","type-post","status-publish","format-standard","hentry","category-selling-on-amazon","category-name","item-wrap"],"jetpack_featured_media_url":"","jetpack_sharing_enabled":true,"jetpack-related-posts":[{"id":17180,"url":"http:\/\/bangla.sitestree.com\/?p=17180","url_meta":{"origin":17174,"position":0},"title":"update_exchange_rate_and_price","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"USE [AmazonProfitLossOrderManagement] GO \/****** Object: StoredProcedure [dbo].[update_exchange_rate_and_price] Script Date: 2020-06-19 10:17:11 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- Alter Procedure update_exchange_rate_and_price remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[update_exchange_rate_and_price] @exchange_rate_from_eu float, @exchange_rate_from_gbp float AS BEGIN remove-this-phrase--\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17179,"url":"http:\/\/bangla.sitestree.com\/?p=17179","url_meta":{"origin":17174,"position":1},"title":"test","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"USE [AmazonProfitLossOrderManagement] GO \/****** Object: StoredProcedure [dbo].[test] Script Date: 2020-06-19 10:17:11 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[test] AS BEGIN \/****** Script for SelectTopNRows command from SSMS ******\/ SELECT\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17176,"url":"http:\/\/bangla.sitestree.com\/?p=17176","url_meta":{"origin":17174,"position":2},"title":"our_profit_loss","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"USE [AmazonProfitLossOrderManagement] GO \/****** Object: StoredProcedure [dbo].[our_profit_loss] Script Date: 2020-06-19 10:17:11 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- Alter Procedure our_profit_loss remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[our_profit_loss] AS BEGIN remove-this-phrase-- SET NOCOUNT ON added\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17185,"url":"http:\/\/bangla.sitestree.com\/?p=17185","url_meta":{"origin":17174,"position":3},"title":"update_supplier_sku","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"\/****** Object: StoredProcedure [dbo].[update_supplier_sku] Script Date: 2020-06-19 10:15:42 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[update_supplier_sku] AS BEGIN update [DealWithAmazonShopForSoul].[dbo].[supplier-dec-28-2018] set Model_Code=concat('shopforsoul-', Model_Code) where Model_Code not like '%shopfor%'; END GO\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17175,"url":"http:\/\/bangla.sitestree.com\/?p=17175","url_meta":{"origin":17174,"position":4},"title":"minimum_price_for_amazon","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"USE [AmazonMinimumPriceAdjustment] GO \/****** Object: StoredProcedure [dbo].[minimum_price_for_amazon] Script Date: 2020-06-19 10:17:46 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[minimum_price_for_amazon] AS BEGIN remove-this-phrase-- SET NOCOUNT ON added to prevent extra result\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]},{"id":17190,"url":"http:\/\/bangla.sitestree.com\/?p=17190","url_meta":{"origin":17174,"position":5},"title":"minimum_price_for_amazon","author":"Sayed","date":"June 19, 2020","format":false,"excerpt":"USE ProductAndPriceManagement GO \/****** Object: StoredProcedure [dbo].[minimum_price_for_amazon] Script Date: 2020-06-19 9:57:08 PM ******\/ SET ANSI_NULLS ON GO SET QUOTED_IDENTIFIER ON GO remove-this-phrase-- ============================================= remove-this-phrase-- Author: <Author,,Name> remove-this-phrase-- Create date: <Create Date,,> remove-this-phrase-- Description: <Description,,> remove-this-phrase-- ============================================= CREATE PROCEDURE [dbo].[minimum_price_for_amazon] AS BEGIN remove-this-phrase-- SET NOCOUNT ON added to prevent extra result\u2026","rel":"","context":"In &quot;manage-selling-on-amazon-using-sql&quot;","block_context":{"text":"manage-selling-on-amazon-using-sql","link":"http:\/\/bangla.sitestree.com\/?cat=1915"},"img":{"alt_text":"","src":"","width":0,"height":0},"classes":[]}],"_links":{"self":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/17174","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/users\/2"}],"replies":[{"embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=17174"}],"version-history":[{"count":1,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/17174\/revisions"}],"predecessor-version":[{"id":17243,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=\/wp\/v2\/posts\/17174\/revisions\/17243"}],"wp:attachment":[{"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=17174"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=17174"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/bangla.sitestree.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=17174"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}