Project 1
** Please observe:-
Hello sir/madam, Challenge files are not uploading since 2 Weeks due to technical issue in Dashboard. So that one mentor suggested me to do like this. So please consider. Thank You....
* *Tasks 1 and 2 I have taken screenshots but they are also not uploading
-- 3. Run SQL command to see the structure of table
USE ecommerce;
use ecommerce;
select * from users_data;
desc users_data;
-- 4. Run SQL command to select first 100 rows of the database
select * from users_data order by identifierHash limit 100;
-- 5. How many distinct values exist in table for field country and language
select count(distinct country), count(distinct language) from users_data;
-- 6. Check whether male users are having maximum followers or female users
select sum(socialNbFollowers), gender from users_data group by gender;
-- 7. Calculate the total users those
-- (a) Uses Profile Picture in their Profile
select count(*) Result from users_data where hasProfilePicture ="True";
-- (b) Uses Application for Ecommerce platform
select count(*) Result from users_data where hasAnyApp ="True";
-- (c) Uses Android app
select count(*) Result from users_data where hasAndroidApp='True';
-- (d) Uses ios app
select count(*) Result from users_data where hasIosApp = 'True';
-- 8. Calculate the total number of buyers for each country
select country, sum(productsBought) Result from users_data group by country order by
sum(productsBought) desc;
-- 9. Calculate the total number of sellers for each count
select country, sum(productsSold) Result from users_data group by country order by
sum(productsSold) asc;
-- 10. Display name of top 10 countries having maximum products pass rate
select country, sum(productsPassRate) Result 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(*) Result from users_data group by language;
-- 12. Check the choice of female users about putting the product in a wishlist
-- or to like socially on an ecommerce platform
select sum(productsWished) ProductsWished from users_data union
select sum(SocialproductsLiked) SocialproductsLiked from users_data
where gender='F';
-- 13. Check the choice of male users about being seller or buyer
select sum(productsSold) ProductsSold from users_data union
select (productsBought) ProductsBought
from users_data where gender='M';
-- 14. Which country is having maximum number of buyers?
select country,sum(productsBought) Result from users_data;
-- 15. List the name of 10 countries having zero number of sellers
select productsSold, country 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) Result 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(*) Result from users_data where gender='F';
-- 19. Display the number of male users of each country at ecommerce platform
select country, count(*) Result from users_data where gender='M';
-- 20. Calculate the average number of products sold and bought on ecommerce
-- platform by male users for each country
select avg(productsSold),avg(productsBought),country from users_data where
gender='M' group by country;