-
Notifications
You must be signed in to change notification settings - Fork 0
/
Airbnb Analysing.sql
68 lines (35 loc) · 1.44 KB
/
Airbnb Analysing.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
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
use Airbn
SELECT * From listings;
/* Data Analysing*/
1. Total Availibility in 30 days, 60 days, 90 days, 365 days?
SELECT SUM(Availability_30) as Availibility_30
from listings;
SELECT SUM(Availability_60) as Availability_60
from listings;
SELECT SUM(Availability_90) as Availability_90
from listings;
select SUM(Availability_365) as Availability_365
from listings;
1. Find dirty Reviews are short listed by Host side
SELECT Host_ID, host_url, Host_Name, COUNT(*) AS Num_Dirty_Reviews FROM listings INNER JOIN listings_xlnm#_FilterDatabase ON listings.ID = listings.id
GROUP BY Host_ID, Host_URL, host_name ORDER BY Num_Dirty_Reviews DESC;
2.Which Neighbourhood group there is a maximum number of properties?
SELECT MAX(Neighbourhood) as Neighbourhood
FROM listings;
3. Which host has maximum number of properties listed?
SELECT Room_Type, COUNT(*) AS Num_of_RoomType
FROM listings
GROUP BY Host_ID
ORDER BY Num_of_RoomType;
4. What is the average price in different listed properties listed?
SELECT AVG(price) as price
FROM listings;
5. What is Maximum Room Type users?
SELECT max(Room_Type) as Room_Type
FROM listings;
6.What is the most prefered having room type in the every neighbourhooAd groups?
SELECT max(Room_Type) from listings;
7. Total availiability of properties having different room Type?
SELECT Room_Type, COUNT(availability)
FROM listings
GROUP BY room_type;