Skip to content

Instantly share code, notes, and snippets.

@MGCodesandStats
Last active January 6, 2023 15:46
Show Gist options
  • Save MGCodesandStats/a489e6b7520b032abf4e3d3ce84dee9d to your computer and use it in GitHub Desktop.
Save MGCodesandStats/a489e6b7520b032abf4e3d3ce84dee9d to your computer and use it in GitHub Desktop.
Analysis of RevPAR trends for Marriott International using SQL. Original figures sourced from historical quarterly reports by Marriott International.
# Average RevPAR by brand from Q1 to Q3 2022
stocks_hotels=# select brand, avg(revpar) from marriott where year='2022' and period<>'Q4' group by brand order by avg(revpar);
brand | avg
------------------+----------------------
Courtyard | 99.3900000000000000
Residence Inn | 140.1266666666666667
Sheraton | 140.8933333333333333
Marriott Hotels | 142.6133333333333333
Westin | 163.3400000000000000
JW Marriott | 200.5866666666666667
W Hotels | 227.8966666666666667
The Ritz-Carlton | 329.7533333333333333
(8 rows)
# Average RevPAR by brand from Q1 to Q3 2019
stocks_hotels=# select brand, avg(revpar) from marriott where year='2019' and period<>'Q4' group by brand order by avg(revpar);
brand | avg
------------------+----------------------
Courtyard | 104.7800000000000000
Residence Inn | 130.0400000000000000
Sheraton | 148.4866666666666667
Marriott Hotels | 157.4633333333333333
Westin | 160.3166666666666667
JW Marriott | 216.3400000000000000
W Hotels | 239.6400000000000000
The Ritz-Carlton | 295.8733333333333333
(8 rows)
# Full Data
stocks_hotels=# select * from marriott order by year, quarter;
brand | adr | revpar | quarter | year | period
------------------+--------+--------+---------+------+--------
JW Marriott | 283.66 | 211.50 | Q1 2019 | 2019 | Q1
Residence Inn | 159.92 | 120.37 | Q1 2019 | 2019 | Q1
Courtyard | 143.21 | 95.27 | Q1 2019 | 2019 | Q1
Westin | 194.93 | 138.44 | Q1 2019 | 2019 | Q1
Sheraton | 177.17 | 126.08 | Q1 2019 | 2019 | Q1
Marriott Hotels | 203.48 | 147.77 | Q1 2019 | 2019 | Q1
W Hotels | 307.92 | 228.84 | Q1 2019 | 2019 | Q1
The Ritz-Carlton | 416.07 | 318.86 | Q1 2019 | 2019 | Q1
JW Marriott | 282.78 | 231.56 | Q2 2019 | 2019 | Q2
Residence Inn | 165.28 | 136.95 | Q2 2019 | 2019 | Q2
Courtyard | 147.57 | 113.20 | Q2 2019 | 2019 | Q2
Westin | 217.15 | 175.41 | Q2 2019 | 2019 | Q2
Sheraton | 198.67 | 162.58 | Q2 2019 | 2019 | Q2
Marriott Hotels | 209.77 | 168.80 | Q2 2019 | 2019 | Q2
W Hotels | 311.12 | 256.29 | Q2 2019 | 2019 | Q2
The Ritz-Carlton | 384.39 | 294.18 | Q2 2019 | 2019 | Q2
JW Marriott | 253.49 | 205.96 | Q3 2019 | 2019 | Q3
Residence Inn | 162.09 | 132.80 | Q3 2019 | 2019 | Q3
Courtyard | 142.33 | 105.87 | Q3 2019 | 2019 | Q3
Westin | 210.02 | 167.10 | Q3 2019 | 2019 | Q3
Sheraton | 192.43 | 156.80 | Q3 2019 | 2019 | Q3
Marriott Hotels | 197.21 | 155.82 | Q3 2019 | 2019 | Q3
W Hotels | 288.79 | 233.79 | Q3 2019 | 2019 | Q3
The Ritz-Carlton | 371.04 | 274.58 | Q3 2019 | 2019 | Q3
Residence Inn | 156.19 | 117.41 | Q4 2019 | 2019 | Q4
Courtyard | 140.19 | 94.99 | Q4 2019 | 2019 | Q4
Westin | 209.50 | 153.53 | Q4 2019 | 2019 | Q4
Sheraton | 203.20 | 151.32 | Q4 2019 | 2019 | Q4
Marriott Hotels | 205.72 | 150.01 | Q4 2019 | 2019 | Q4
W Hotels | 328.62 | 257.32 | Q4 2019 | 2019 | Q4
The Ritz-Carlton | 395.84 | 288.59 | Q4 2019 | 2019 | Q4
JW Marriott | 276.03 | 205.28 | Q4 2019 | 2019 | Q4
JW Marriott | 278.10 | 89.82 | Q1 2021 | 2021 | Q1
Residence Inn | 125.39 | 76.55 | Q1 2021 | 2021 | Q1
Courtyard | 91.47 | 37.27 | Q1 2021 | 2021 | Q1
Westin | 169.16 | 39.97 | Q1 2021 | 2021 | Q1
Sheraton | 148.59 | 25.88 | Q1 2021 | 2021 | Q1
Marriott Hotels | 145.03 | 34.93 | Q1 2021 | 2021 | Q1
W Hotels | 325.20 | 91.01 | Q1 2021 | 2021 | Q1
The Ritz-Carlton | 518.62 | 183.46 | Q1 2021 | 2021 | Q1
Sheraton | 174.92 | 59.63 | Q2 2021 | 2021 | Q2
JW Marriott | 265.07 | 128.58 | Q2 2021 | 2021 | Q2
The Ritz-Carlton | 476.74 | 236.30 | Q2 2021 | 2021 | Q2
W Hotels | 297.92 | 127.76 | Q2 2021 | 2021 | Q2
Marriott Hotels | 163.00 | 67.46 | Q2 2021 | 2021 | Q2
Westin | 194.62 | 79.07 | Q2 2021 | 2021 | Q2
Courtyard | 112.88 | 65.34 | Q2 2021 | 2021 | Q2
Residence Inn | 143.36 | 102.17 | Q2 2021 | 2021 | Q2
JW Marriott | 249.67 | 133.20 | Q3 2021 | 2021 | Q3
Residence Inn | 163.28 | 120.56 | Q3 2021 | 2021 | Q3
Courtyard | 131.16 | 83.23 | Q3 2021 | 2021 | Q3
Westin | 215.27 | 119.69 | Q3 2021 | 2021 | Q3
Sheraton | 190.21 | 100.83 | Q3 2021 | 2021 | Q3
Marriott Hotels | 184.57 | 100.16 | Q3 2021 | 2021 | Q3
W Hotels | 286.81 | 152.07 | Q3 2021 | 2021 | Q3
The Ritz-Carlton | 457.14 | 254.66 | Q3 2021 | 2021 | Q3
The Ritz-Carlton | 519.73 | 303.96 | Q4 2021 | 2021 | Q4
Residence Inn | 160.03 | 114.28 | Q4 2021 | 2021 | Q4
Courtyard | 132.99 | 77.20 | Q4 2021 | 2021 | Q4
Westin | 213.23 | 121.95 | Q4 2021 | 2021 | Q4
Sheraton | 199.48 | 103.68 | Q4 2021 | 2021 | Q4
Marriott Hotels | 190.67 | 104.51 | Q4 2021 | 2021 | Q4
W Hotels | 351.67 | 199.25 | Q4 2021 | 2021 | Q4
JW Marriott | 281.62 | 164.65 | Q4 2021 | 2021 | Q4
The Ritz-Carlton | 560.94 | 321.89 | Q1 2022 | 2022 | Q1
Residence Inn | 171.89 | 121.40 | Q1 2022 | 2022 | Q1
Courtyard | 142.79 | 78.65 | Q1 2022 | 2022 | Q1
Westin | 231.53 | 124.89 | Q1 2022 | 2022 | Q1
Sheraton | 215.66 | 115.86 | Q1 2022 | 2022 | Q1
Marriott Hotels | 206.99 | 107.67 | Q1 2022 | 2022 | Q1
W Hotels | 419.42 | 212.45 | Q1 2022 | 2022 | Q1
JW Marriott | 338.56 | 189.66 | Q1 2022 | 2022 | Q1
The Ritz-Carlton | 517.87 | 362.15 | Q2 2022 | 2022 | Q2
Residence Inn | 186.01 | 149.16 | Q2 2022 | 2022 | Q2
Courtyard | 158.75 | 111.38 | Q2 2022 | 2022 | Q2
Westin | 253.54 | 184.25 | Q2 2022 | 2022 | Q2
Sheraton | 228.90 | 159.10 | Q2 2022 | 2022 | Q2
Marriott Hotels | 228.51 | 163.82 | Q2 2022 | 2022 | Q2
W Hotels | 362.60 | 255.22 | Q2 2022 | 2022 | Q2
JW Marriott | 320.80 | 231.91 | Q2 2022 | 2022 | Q2
The Ritz-Carlton | 475.75 | 305.22 | Q3 2022 | 2022 | Q3
Residence Inn | 188.89 | 149.82 | Q3 2022 | 2022 | Q3
Courtyard | 158.66 | 108.14 | Q3 2022 | 2022 | Q3
Westin | 251.20 | 180.88 | Q3 2022 | 2022 | Q3
Sheraton | 227.09 | 147.72 | Q3 2022 | 2022 | Q3
Marriott Hotels | 223.61 | 156.35 | Q3 2022 | 2022 | Q3
W Hotels | 325.85 | 216.02 | Q3 2022 | 2022 | Q3
JW Marriott | 275.55 | 180.19 | Q3 2022 | 2022 | Q3
(88 rows)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment