<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Ngozi Okonkwo on Medium]]></title>
        <description><![CDATA[Stories by Ngozi Okonkwo on Medium]]></description>
        <link>https://medium.com/@ngoziokonkwo1607?source=rss-1c0e7eb992f0------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nEVFlrMMXjBuY7XpncZtpg.jpeg</url>
            <title>Stories by Ngozi Okonkwo on Medium</title>
            <link>https://medium.com/@ngoziokonkwo1607?source=rss-1c0e7eb992f0------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 09:02:48 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@ngoziokonkwo1607/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Exploratory Data Analysis of BellaxHotel bookings.]]></title>
            <link>https://medium.com/@ngoziokonkwo1607/exploratory-data-analysis-of-bellaxhotel-bookings-1738a25cfa07?source=rss-1c0e7eb992f0------2</link>
            <guid isPermaLink="false">https://medium.com/p/1738a25cfa07</guid>
            <category><![CDATA[exploratory-data-analysis]]></category>
            <category><![CDATA[case-study]]></category>
            <category><![CDATA[data-analysis]]></category>
            <category><![CDATA[sql]]></category>
            <dc:creator><![CDATA[Ngozi Okonkwo]]></dc:creator>
            <pubDate>Mon, 23 Jan 2023 23:10:03 GMT</pubDate>
            <atom:updated>2023-01-23T23:58:14.287Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*qlXBbDtSoIB1hCsOJjUs4Q.png" /></figure><p>Stakeholders at BellaxHotel are concerned about her growth and are looking to explore the Bookings Dataset available. I was employed to uncover insights and possible trends as well as answer stakeholders questions.</p><p>Below are the business questions asked by the stakeholders;</p><ol><li>Is our revenue growing by year?</li><li>Which hotel type generated the most revenue?</li><li>What is the total and average night spent in the hotel?</li><li>What is the total number of customers lodged in each hotel?</li><li>What are the most busy months?</li><li>Which country were most of customers from?</li></ol><h4>Getting the Data</h4><p>The data was downloaded I created a database called ‘Project’ and imported the data into MSSQL server. I will cover the steps to import data from excel or other sources into MSSQL server in my next post.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/519/1*6SU-jlUgt84A4-K7Djcl3A.png" /><figcaption>Data successfully imported into the database.</figcaption></figure><p>For this project, BellaxHotel bookings dataset was explored using SQL. The dataset contains 5 tables (2018, 2019, 2020, market_segment and meal_cost).</p><p><strong>Cleaning the data</strong></p><p>The dataset has been cleaned, it had no irrelevant information nor null values. I therefore began exploration.</p><p><strong>Transforming the data</strong></p><p>First, I viewed the data set and did that by writing a SQL query to select all columns in the respective tables. Since, the year tables contain the same columns, I queried the 2018 table along side market_segment and meal_cost.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iAc2AqrzvB6nWiffnQ9Wrw.png" /><figcaption>Viewed the dataset.</figcaption></figure><p>Creating a common table expression (CTE)</p><p>I created a CTE called ‘bookings’ using the UNION clause, this unified the year tables in order to improve the performance of the query, I then joined the market_segment and meal_cost tables, using the left join clause, to the bookings table.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Ci9wcbkqa0d8LZqO9Bxm0g.png" /><figcaption>Merged the dataset.</figcaption></figure><p><strong>Exploring the data</strong></p><p>I explored the data by answering the stakeholders questions.</p><p><strong>Is our revenue growing by year?</strong></p><p>for this analysis, I used the ROUND and SUM aggregate functions to calculate the revenue and grouped by year.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/662/1*I-nCGRGofTGKF40aaOfadQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/238/1*lxMa45TdzzMRpUqcgYIoEg.png" /><figcaption>Hotel revenue by Year</figcaption></figure><p>The hotel’s revenue is growing by year, though there is a slight decrease in 2020 by 6 Million Dollars.</p><p><strong>Which hotel type generated the most revenue?</strong></p><p>for this evaluation, I had to calculate the revenue by adding the total nights , multiplied by adr(Average Daily Rate) and grouped the revenue by year and hotel type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/683/1*sM8EEYq6jpoooaBi-uGfdA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/301/1*pMVGVc6_LtBGshZ7oI5pZw.png" /><figcaption>Revenue by year and hotel_type</figcaption></figure><p>The City Hotel generated the most revenue over the years.</p><p><strong>What is the total and average night spent in the hotel?</strong></p><p>To answer this question, I used the SUM aggregate function to get the total nights and AVG aggregate function to get the average night spent in each hotel type.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/645/1*FCEQuKnnqdFOXOVAHb15Tg.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/275/1*KVlv0PltHsM1Gp0skMuI9Q.png" /><figcaption>Total_nights and Average_nights.</figcaption></figure><p>The average night spent in City Hotel and Resort Hotel were 3 and 4 respectively. More nights were spent in Resort Hotel.</p><p><strong>What is the total number of customers lodged in each hotel?</strong></p><p>for this question, I used the COUNT aggregate function to get the total number of persons that lodged in each hotel over the years.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/524/1*0Ff5_7oU_ccynLA3oNZ0Ww.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/232/1*S5z6YrfL_lknWA4pR-6E9Q.png" /></figure><p>City Hotel had more bookings which indicated more revenue.</p><p><strong>Which country were most of customers from?</strong></p><p>To answer this question, I selected the top 3 countries, segmented the results by countries, then, arranged the results in descending order.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/443/1*RYm_IETgmKrIjcUju7WiRA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/218/1*sQvx0zIjGqzQ2tHSX6u3pA.png" /></figure><p>Most of BellaxHotel customers were from Portugal, The United kingdom and France.</p><p><strong>What are the busiest months?</strong></p><p>For this analysis, I selected the top 3 months as busiest months, calculated the revenue and grouped by the months.</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/653/1*EhrjwSjpavhWLJx_L12hIw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/224/1*A8BJQooIjp9riKDwaFthTw.png" /></figure><p>August is the busiest month, and understandably the peak of summer.</p><p><strong>Summary</strong></p><p>This project was done to test my understanding of case studies, basic SQL (SELECT, FROM, ROUND, SUM,GROUP BY, TOP, ORDER BY, UNION) syntaxes. Also, I employed the use of CTE by using UNION clause to merge the year tables. Thank you for reading.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=1738a25cfa07" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>