Project 1
use ecommerce;
select* from users_data;
DESC users_data;
select*from users_data limit 100;
select count(distinct country) ,count(distinct language) from users_data;
6...
select count (socialNbFollowers ) from users_data group by gender ;
Select (socialNbFollowers) from users_data group by gender;
select count(*) as c , hasProfilePicture from users_data group by hasProfilePicture order by c , hasProfilePicture=True;
select count(*) as c , hasAnyApp from users_data group by hasAnyApp order by c , c=true;
select count(*) as c ,hasAndroidApp from users_data group by hasAndroidApp order by c , hasAndroidApp = 'True';
select count(*) as c ,hasIosApp from users_data group by hasIosApp order by c , hasIosApp= true;
use ecommerce;
select* from users_data;
select count( productsBought) from users_data group by productsBought order by productsBought ASC;
select count( productsSold) from users_data group by productsSold order by productsSold desc;
select max(productsPassRate) , country from users_data where productsPassRate=100 group by country limit 10;
select count country , productsPassRate from users_data group by country order by productsPassRate desc;
select count( language) , language from users_data group by language ;
select d1. productsWished , d2.socialProductsLiked, d1.gender from users_data d1,users_data d2 where d1.gender=d2.gender like 'M%';
select d1.productsBought , d2.productsSold,d2.gender from users_data d1,users_data d2 where d1.gender =d2.gender like 'F%' ;
select max(productsBought), country from users_data group by country;
select country from users_data where productsBought = 57;
select count(country) from users_data where productsSold=0 ;
select*from users_data order by socialNbFollows desc limit 110 ;
select count(gender) from users_data where daysSinceLastLogin > 100 ;
select count(gender) , country from users_data where gender like'F%' group by country ;
select count( gender) , country from users_data where gender like 'M%' group by country;
select avg(productsSold), avg(productsBought) from users_data where gender Like 'M%';