Challenge

Project 1

Q3)

use ecommerce;
describe users_data;

Q4)use ecommerce;
select * from users_data LIMIT 0,100;

Q5)use ecommerce;
select distinct country ,language from users_data;

Q6)use ecommerce;
select gender,sum(socialNbfollowers) as Total from users_data
group by gender ;

Q7)a)use ecommerce;
select * from users_data;
select count(type),hasProfilePicture
from users_data
where hasProfilePicture ='TRUE'
group by type ;

Q7)b)select count(type),hasAnyApp
from users_data
where hasAnyApp='TRUE'
group by hasAnyApp

Q7)c)use ecommerce;
select * from users_data;
select count(type),hasAndroidApp
from users_data
where hasAndroidApp='TRUE'
group by hasAndroidApp

Q7)d)use ecommerce;
select * from users_data;
select count(type),hasIosApp
from users_data
where hasIosApp='TRUE'
group by hasIosApp

Q8)

use ecommerce;
select * from users_data;
select country ,sum(productsBought) as buyers
from users_data
group by country
having buyers >=1
order by buyers DESC

Q9)

use ecommerce;
select * from users_data;

select country,count(productssold)as seller
from users_data
group by country
having count(productsSold) >= 1
order by seller Asc

Q10)

use ecommerce;
select * from users_data;
select country ,sum(productsPassRate) as passRate
from users_data
group by country
having passRate >=1
order by passRate DESC
limit 10

Q11)use ecommerce;
select * from users_data;
describe users_data;
select language,count(type)AS
users
from users_data
group by language

Q12)

select t1.gender, t1.socialProductsLiked as total
from users_data as t1
where gender='F'
union
select t2.gender,t2.productsListed as total
from users_data as t2
where gender='F'

Q13)select t1.gender, t1.productsSold as total
from users_data as t1
where gender ='M'
union
select t2.gender, t2.productsBought as total
from users_data as t2
where gender='M'

Q14)select country , Max(productsBought)as Buyer
from users_data
group by country
order by Buyer desc limit 1;

Q15)use ecommerce;
select * from users_data;
select country , Max(productssold)as seller
from users_data
where productssold=0
group by country
order by seller desc limit 10

Q16)use ecommerce;
select * from users_data;
select type ,daysSinceLastLogin from users_data
order by daysSinceLastLogin desc limit 110

Q17)

use ecommerce;
select *from users_data;

select gender,type,daysSinceLastLogin,count(*)
from users_data
where daysSinceLastLogin>=100
group by gender,type,daysSinceLastLogin
having gender='F';

Q18)use ecommerce;
select country , count(gender)as FemAle_User from users_data
where gender='F'
group by country

Q19)

use ecommerce;
select * from users_data;
select country , count(gender)as male_User from users_data
where gender='M'
group by country

Q20)

use ecommerce;
select * from users_data;
select gender,((productsSold+productsBought)/2) as AVG
from users_data
group by gender;
select country ,gender,AVG(productsSold),avg(productsBought)
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.