Challenge

Project 1

#1

created a new schema ecommerce

#2

imported csv file

use ecommerce;
select * from users_data;

#3
describe users_data ;

#4
select * from users_data limit 100;

#5
select language, country from users_data ;
select count(distinct country),count(distinct language) from users_data;

#6
select * from users_data;
select gender,max(socialNbfollowers)from users_data group by gender;

#7
select 'Profile Picture',count(hasprofilepicture) from users_data where hasprofilepicture = 'True'
union
select 'ios app' ,count(hasiosApp) from users_data where hasiosApp = 'True'
union
select 'hasAndroidApp',count(hasAndroidApp) from users_data where hasAndroidApp = 'True'
union
select 'hasAnyApp' ,count(hasAnyApp) from users_data where hasAnyApp ='True';

#8
select country,sum(productsBought) total_number_of_buyers from users_data group by country order by total_number_of_buyers desc;

#9
select country,sum(productsSold) total_number_of_sellers from users_data group by country order by total_number_of_sellers asc;

#10
select country,sum(productsPassRate) maxofproductpassrate from users_data group by country order by maxofproductpassrate desc limit 10;

#11
select language ,count(type) users from users_data group by language;

#12
select * from users_data;
select gender,sum(productsWished),sum(socialProductsLiked) from users_data where gender = 'F' and hasAnyApp = 'True';

#13
select gender ,sum(productsBought),sum(productsSold)from users_data where gender = 'M';

#14
select country,sum(productsBought) byers from users_data users_data group by country order by byers desc limit 1;

#15
select country,sum(productsSold) sellers from users_data group by country order by sellers limit 10;

#16
select * from users_data order by dayssinceLastLogin limit 110;

#17
select count(gender) Femal_users from users_data where gender ='F' and dayssinceLastLogin > 100;

#18
select country ,count(gender) femal from users_data where gender = 'F' group by country;

#19
select country ,count(gender) mail from users_data where gender ='M' group by country;

#20
select avg(productsSold) aver,avg(productsBought) Brought ,gender,country from users_data where gender = 'M' group by country;

Your portfolio, next

Ship work like this
in your own course.

Talk to a career counsellor

Free 20-minute call. We'll map the right course to where you want to work.

By submitting you agree to our Terms and Privacy Policy.