All Courses
All Courses
Courses by Software
Courses by Semester
Courses by Domain
Tool-focused Courses
Machine learning
POPULAR COURSES
Success Stories
1.Create new schema as ecommerce: 2.Import .csv file users_data into MySQL:- 3.Run SQL command to see the structure of table: => desc users_data; 4.Run SQL command to select first 100 rows of the database: =>select * from users_data limit 100; 5.To find distinct values exist in table…
ANANYA RAO
updated on 24 Jan 2023
1.Create new schema as ecommerce:
2.Import .csv file users_data into MySQL:-
3.Run SQL command to see the structure of table:
=> desc users_data;
4.Run SQL command to select first 100 rows of the database:
=>select * from users_data limit 100;
5.To find distinct values exist in table for field country and language:
=>select count(distinct(country)) country,count(distinct(language)) language from users_data;
6.To Check whether male users are having maximum followers or female users:
=>select sum(socialNbFollowers) as total_followers , gender from users_data group by gender;
7. To calculate the total users those:
=>select count(hasProfilePicture) as total_profile_picture from users_data where hasProfilePicture= 'True';
2.Uses Application for Ecommerce platform:
=> select count(hasAnyApp) as total_Anyapplication from users_data where hasAnyApp = 'True';
3.Uses Android app:
=>select count(hasAndroidApp) as total_android_users from users_data where hasAndroidApp ='true';
4.Uses ios app:
=>select count(hasIosApp) as total_IosUsers from users_data where hasIosApp ='true';
8.To calculate the total number of buyers for each country and sort the result in descending order of total number of buyers:
=> select country,sum(productsBought) as total_buyers from users_data group by country order by sum(productsBought) desc;
9.To calculate the total number of sellers for each country and sort the result in ascending order of total number of sellers. (Hint: consider only those users having at least 1 product sold.)
=>SELECT country,avg(productsSold) from users_data group by country order by avg(productsSold) ASC;
10.Display name of top 10 countries having maximum products pass rate.
=>select country,sum(productsPassRate) Products_PassRate from users_data group by country order by sum(productsPassRate) desc limit 10;
11.Calculate the number of users on an ecommerce platform for different language choices.
=> SELECT language, count(*) as no_of_users from users_data group by language;
12.To Check the choice of female users about putting the product in a wishlist or to like socially on an ecommerce platform. (Hint: use UNION to answer this question.)
=> select gender,sum(productsWished) as Total_product_wished , sum(socialProductsLiked) as Total_Social_Products_liked from users_data where gender = 'F';
13.Check the choice of male users about being seller or buyer. (Hint: use UNION to solve this question.)
=> select gender, SUM(productsSold) ,SUM(productsBought) FROM users_data WHERE gender='M';
14.Which country is having maximum number of buyers?
=> select country ,SUM(productsBought) Sum_of_product_bought FROM users_data GROUP BY country ORDER BY SUM(productsBought) DESC limit 1;
15.List the name of 10 countries having zero number of sellers.
=> select country , productsSold from users_data where productsSold=0 limit 10;
16.Display record of top 110 users who have used ecommerce platform recently.
=> SELECT * FROM users_data ORDER BY daysSinceLastLogin LIMIT 110;
17.Calculate the number of female users those who have not logged in since last 100 days.
=>select gender, COUNT(daysSinceLastLogin) no_of_female_users from users_data
where gender = 'F' and daysSinceLastLogin>=100;
18.Display the number of female users of each country at ecommerce platform.
=>select country,count(*) no_of_female_users from users_data where gender ='F' group by country;
19.Display the number of male users of each country at ecommerce platform.
=>select country,count(*) no_of_male_users from users_data where gender ='M' group by country;
20.To Calculate the average number of products sold and bought on ecommerce platform by male users for each country.
=>select country,avg(productsSold) as average_products_sold , avg(productsBought) as average_products_bought
from users_data where gender ='M' group by country ;
Leave a comment
Thanks for choosing to leave a comment. Please keep in mind that all the comments are moderated as per our comment policy, and your email will not be published for privacy reasons. Please leave a personal & meaningful conversation.
Other comments...
Project 2 - EDA on Vehicle Insurance Customer Data
Project 2 - EDA on Vehicle Insurance Customer Data The "Project 2 - EDA on Vehicle Insurance Customer Data" is an exploratory data analysis project focused on analyzing and gaining insights from a dataset containing customer data in the vehicle insurance domain. The objective of this project is to explore and understand…
25 May 2023 05:26 PM IST
Project 1 - English Dictionary App & Library Book Management System
English Dictionary App import pickle # Initialize an empty dictionarydictionary = {} # Open the file in write mode and serialize the dictionarywith open("words.txt", "wb") as file: pickle.dump(dictionary, file) print("words.txt file created successfully!") ---------------------------------------------- import pickle def…
23 May 2023 01:45 PM IST
Project 2 - Gender Bias in Science and Technical field
Title: Literacy Rate in Tamilnadu
23 Mar 2023 07:38 AM IST
Project 1 - Analyzing the Education trends in Tamilnadu
Analyzing the Education trends in Tamilnadu The dashboard : -A pie graph of women inBiological ScientistsChemists & Materials ScientistsComputer & Mathematical OccupationsEngineers & Architects -The trend of percent women graduating in Computer science and Engineering from 2000-2015Should be in text after the…
21 Mar 2023 08:28 AM IST
Related Courses
0 Hours of Content
Skill-Lync offers industry relevant advanced engineering courses for engineering students by partnering with industry experts.
© 2025 Skill-Lync Inc. All Rights Reserved.