Challenge

Project 1

## 1ST Answer
create schema ecommerce;

## 2nd Answer
-- import csv file users into table data import wildcard

## 3rd Answer
Desc users_data;

## 4th Answer
select * from users_data limit 100;

## 5th Answer
select distinct country,language from users_data;

## 6TH Answer
select 'Male users', sum(socialNbFollowers) as followers from users_data where gender = 'M' union
select 'female users', sum(socialNbFollowers) from users_data where gender = 'F';

## 7th Answer
select 'uses profile picture in their profile' parameter,count(*) users from users_data where hasprofilepicture = 'True' union
select 'uses application for ecommerce platform', count(*) from users_data where hasAnyApp = 'True' union
select 'uses android app', count(*) from users_data where hasandroidapp = 'True' union
select 'uses ios app', count(*) from users_data where hasiosapp = 'True';


## 8th Answer
select country,count(productsBought) as Total_no_of_buyers from users_data where productsBought >=1 group by country order by count(productsBought) desc;

## 9th Answer
select country,count(productssold) as Total_no_of_sellers from users_data where productsSold >=1 group by country order by count(productsSold) asc;

## 10th Answer
select country,max(productspassrate) from users_data group by country order by max(productspassrate) desc limit 10;

## 11th Answer
select language,count(language) No_of_users from users_data group by language;

## 12th Answer
select 'F' Gender, 'productwish' product, count(productsWished) Total_users from users_data where gender = 'F' union
select 'F', 'product like', count(socialProductsLiked) from users_data where gender = 'F';

## 13th Answer
select 'M' Gender , 'product sell' Product, count(productssold) Total_users from users_data where gender = 'M' union
select 'M', 'product bought',count(productsbought) from users_data where gender = 'M' ;

## 14th Answer
select country, count(productsbought) from users_data group by country order by count(productsbought) desc ;

## 15th Answer
select country,count(productssold) as non_sellers from users_data where country in (
select country from users_data where productssold = 1) group by country limit 10;

## 16th Answer
select identifierHash, daysSinceLastLogin from users_data order by dayssincelastlogin asc limit 110;

## 17th Answer
SELECT gender, COUNT(daysSinceLastLogin) FROM users_data WHERE gender = 'F' AND daysSinceLastLogin >=100 ;

## 18th Answer
select country,count(*) from users_data where gender = 'F' group by country order by country ;

## 19th Answer
select country,count(*) from users_data where gender= 'M' group by country order by country ;

## 20th Answer
select country,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.