Project 1
1.
create database ecommerce;
2.
Imported the data from .csv file successfully
3.
use ecommerce;
desc users_data;
4.
select * from users_data limit 100;
5.
select distinct country,language from users_data;
6.
select gender,sum(socialNbFollowers) from users_data group by gender;
7.
select count(*) from users_data where hasProfilePicture = 'True';
select count(*) from users_data where hasAnyApp = 'True';
select count(*) from users_data where hasAndroidApp = 'True';
select count(*) from users_data where hasIosApp = 'True';
8.
select country, sum(productsBought) from users_data where productsBought > 0 group by country order by sum(productsBought) DESC;
9.
select country, sum(productsSold) from users_data where productsSold > 0 group by country order by sum(productsSold) DESC;
10.
select country from users_data group by country order by sum(productsPassRate) desc limit 10;
11.
select language,count(hasAnyApp) from users_data where hasAnyApp = 'True' group by language ;
12.
select count(gender) from users_data where gender ='f' and (productsWished > 0 or socialProductsLiked > 0 );
13.
select count(gender) from users_data where gender ='m' and (productsSold > 0 or productsBought > 0);
14.
select country from users_data where productsBought > 0 group by country order by sum(productsBought) desc limit 1;
15.
select country from users_data where productsSold = 0 group by country limit 10;
16.
select * from users_data order by daysSinceLastLogin asc limit 110;
17.
select count(gender) from users_data where daysSinceLastLogin > 100 and gender='f';
18.
select country,count(gender) from users_data where gender='f' and hasAnyApp = 'True' group by country;
19.
select country,count(gender) from users_data where gender='m' and hasAnyApp = 'True' group by country;
20.
select country,avg(productsSold)as avgSold,avg(productsBought) as avgBought from users_data where gender='m' and hasAnyApp='True' group by country;