-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathMobile Brand Analysis.sql
49 lines (39 loc) · 1.35 KB
/
Mobile Brand Analysis.sql
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
CREATE schema mobdata;
use mobdata;
select * from mobile;
-- Check mobile feature and price list --
select phone_name, price from mobile;
-- Find out the price of 5 most expensive phone --
select * from mobile
order by price desc
limit 5;
-- Find out the price of 5 most cheapest phones--
select * from mobile
order by price asc
limit 5;
-- List of top 5 Samsung phone with price and all feature --
select * from mobile where brands = "Samsung"
order by price desc
limit 5;
-- Must have android phone list then top 5 high price android phones --
select * from mobile where operating_system_type = "Android"
order by price desc
limit 5;
-- Must have android phone list than top 5 lower price android phones --
select * from mobile where operating_system_type = "Android"
order by price asc
limit 5;
-- Must have IOS phone list then top 5 High price IOS phones --
select * from mobile where operating_system_type = "IOS"
order by price desc
limit 5;
-- Must have IOS phone list then top 5 lower price IOS phones --
select * from mobile where operating_system_type = "IOS"
order by price asc
limit 5;
-- Write query which phone support 5g and also top 5 phone with 5g support --
select * from mobile where 5g_availability = "Yes"
order by price desc
limit 5;
-- Total price of all mobile is to be found with brand name --
select brands,sum(price) from mobile group by brands;