Home / Expert Answers / Computer Science / pull-all-of-the-products-that-are-currently-on-markdown-in-your-results-include-product-id-pa870

(Solved): Pull all of the products that are currently on markdown. In your results, include: - product_id - ...



Pull all of the products that are currently on markdown.
In your results, include:
- product_id
- sku
- original_price
- currChallenge
\begin{tabular}{|ll|}
\hline \multicolumn{2}{|c|}{ Retail.Products } \\
\hline product_id & integer \\
sku & varcha

Pull all of the products that are currently on markdown. In your results, include: - product_id - sku - original_price - current_price - on_markdown Please create or open a file Pull the dollar amount that is being discounted for each of the products that are \( > \) currently on markdown. Add this new column onto the end of your results and call it discount_amount. Calculate what percentage of the original_price the discount_amoun Remember to add this calculation to the end of your query as another col name it discount_pct. Make sure that the result is less than \( \mathbf{1} \) and contains \( \mathbf{2} \) decimal places. Now that you have the discount_pct, use your code from that calculation and \( > \) multiply it by the original_price to see if it matches the discount_amount you calculated. Again, do this calculation in a new column and name the column check. Determine what the sale price would be for each item if the Marketing team went \( > \) off the rails and implemented a sale for \( 35 \% \) off the original price of all items! Once again, add this new column onto the end of your existing query and name it discount_35. Challenge \begin{tabular}{|ll|} \hline \multicolumn{2}{|c|}{ Retail.Products } \\ \hline product_id & integer \\ sku & varchar(20) \\ product_type & varchar(255) \\ color & varchar(255) \\ size & numeric \( (12,1) \) \\ full_name & varchar(255) \\ category & varchar(255) \\ material & varchar(255) \\ created_at & date \\ original_price & integer \\ current_price & integer \\ on_markdown & integer \\ \hline \end{tabular}


We have an Answer from Expert

View Expert Answer

Expert Answer


Language: SQL SELECT product_id,
We have an Answer from Expert

Buy This Answer $5

Place Order

We Provide Services Across The Globe