Project 1
CREATE DATABASE ecommerce;
use ecommerce;
DESC users_data;
select * from users_data;
select * from users_data LIMIT 100;
select count(DISTINCT country) country, count(Distinct language) Language from users_data;
select gender, max(socialNbFollowers)Max_Followers from users_data Group by gender;
select count(hasprofilepicture) From users_data WHERE hasprofilepicture = 'True';
select count(*) from users_data WHERE hasAnyApp = 'True';
select count(hasAndroidApp) From users_data WHERE hasAndroidApp = 'True';
select count(hasiosApp) From users_data WHERE hasiosApp = 'True';
Select country, count(productsBought) from users_data WHERE productsBought != 0 Group By country Order By COUNT(productsBought) DESC;
Select Distinct country,count(productsSold) from users_data where productsSold !=0 group by country order by Count(productsSold);
select Distinct country,max(productsPassRate) from users_data group by country order by max(productsPassRate) Desc Limit 10;
select count(language), language from users_data Group by language;
select count(productsWished) from users_data WHERE (gender = 'F' And productsWished > 0) union select count(socialProductsLiked) from users_data Where (gender = 'F' And socialProductsLiked > 0);
select count(productsBought) from users_data Where (gender = 'M' And productsBought > 0) union select count(productsSold) from users_data Where (gender = 'M' And productsSold > 0);
select country, count(productsBought) From users_data group by country order by count(productsBought) DESC;
select country, sum(productsSold) sellers From users_data group by country order by Count(productsBought)DESC;
select * from users_data order by daysSinceLastLogin Limit 110;
select count(gender) Female From users_data WHERE gender = 'F' And daysSinceLastLogin > 100;
select country, count(gender) Female from users_data where gender = 'F' And hasAnyApp = 'True' group by country;
select country, count(gender) male from users_data where gender = 'M' and hasAnyApp = 'True' group by country;
select Avg(productsSold) Products_Sold, Avg(productsBought) Products_Bought from users_data where gender = 'M' group by country;