2024: Week 4 - Unpopular Seats

 Created by: Carl Allchin

Last week you needed to use a Join technique to pair the flight data with the sales targets. This week you'll be using Joins again but this time in a different way. 

When using Joins, there are two things you need to set up:

  • Join Condition - what logic will join similar rows of data together from each data set
  • Join Type - determines what data you will bring back based on the Join Condition
This challenge will test using join types to return the data you require for the output.

This week we are trying to understand which seats aren't chosen on our planes as we're thinking of applying fees for customers to choose their seat when booking. 

Input

Seat allocation per customer. We have had three downloads sent to us, one for the Flow Card customers and two where they aren't Flow Card customers. They're available here.

The seating plan for our planes



Requirements

  • Input the Excel workbook containing the four worksheets of data
  • Union the Flow Card and Non-Flow card data sets together
  • Create a data field to show whether the seat was booked by someone with the Flow Card or not
    • Call this field 'Flow Card?'
  • Aggregate the Seat Bookings to count how many bookings there are for:
    • Each Seat
    • In each Row
    • In each Class
    • For Flow and Non-Flow Card holders
  • Join on the Seating Plan data to ensure you have a data set for every seat on the plane, even if it hasn't been book
    • Only return the records for the seats that haven't been booked
  • Output the data set showing what seat, rows and class have NOT been booked

Output



3 data fields:
  • Class
  • Seat
  • Row

We're not saying how many rows this week as this is the answer we'd like you to post in your solutions! 

You can download the outputs from here. If you want to check your results. 

After you finish the challenge make sure to fill in the participation tracker, then share your solution on Twitter using #PreppinData and tagging @Datajedininja@JennyMartinDS14 & @TomProwse1

You can also post your solution on the Tableau Forum where we have a Preppin' Data community page. Post your solutions and ask questions if you need any help! 

Popular posts from this blog

2023: Week 1 The Data Source Bank

2023: Week 2 - International Bank Account Numbers

How to...Handle Free Text