Great Deal! Get Instant $10 FREE in Account on First Order + 10% Cashback on Every Order Order Now

You are hired by a chain of online retail stores“ Fastkart”. They have provided you with “Fastkart” database and seek answers to the following queries as the results from these queries will help...

1 answer below »


You are hired by a chain of online retail stores
Fastkart”. They have provided you with “Fastkart” database and seek answers to the following queries as the results from these queries will help the company in making data-driven decisions that will impact the overall growth of the online retail stores.




All the questionscomes under MYSQL and the queries should be executed in MYSQL. (SQL Script -
Fastkart.sql
)



All Questions carry 8 marks. Total Marks (8 x 10) = 80




Note:In case the file gets open in the browser, Please copy the entire text(including comment) and paste it on MySQL workbench. Execute all the commands to create a database schema. In case, if you are able to download the file, please use MySQL Workbench, File>open SQL Script>FastKart.SQL and then execute all the statements to create a database schema.




All Questions carry 8 marks. Total Marks (8 x 10) = 80

Answered 1 days After Jan 06, 2023

Solution

Aditi answered on Jan 07 2023
36 Votes
1. List Top 3 products based on QuantityAvailable. (productid, productname, QuantiSELECT ProductId,ProductName, QuantityAvailable FROM Products
order by QuantityAvailable DESC limit 3;
2. SELECT pd.EmailId,pd.QuantityPurchased as Total_Transactions
FROM PurchaseDetails pd INNER JOIN Products p
ON pd.ProductId=p.ProductId GROUP by EmailId
HAVING count(QuantityPurchased)>10 ORDER by Total_Transactions DESC;
3. Select c.CategoryName as NameOfTheCategory, p.QuantityAvailable as TotalQuantityAvailable
from Products p
INNER JOIN Categories c
ON p.CategoryId = c.CategoryId...
SOLUTION.PDF

Answer To This Question Is Available To Download

Related Questions & Answers

More Questions »

Submit New Assignment

Copy and Paste Your Assignment Here