Question: Please help me ASAP. This is being completed in Python using SQLite. The provided database structure is listed below. The solution should be formatted to
Please help me ASAP. This is being completed in Python using SQLite. The provided database structure is listed below. The solution should be formatted to be read by any SQL library. I have no idea about these two questions. Please help me, Thanks a lot!!!
Provided Database
The database provided by the park administration is formatted to be readable by any SQL database library. The course staff recommends the sqlite3 library. The database contains three tables, named 'checkins', 'attractions', and 'sequences'. The information contained in each of these tables is listed below:
checkins:
- Description: check-in data for all visitors for the day in the park. The data includes two types of check-ins, inferred and actual checkins. - Fields: visitorID, timestamp, attraction, duration, type
attraction:
- The attractions in the park by their corresponding AttractionID, Name, Region, Category, and type. Regions are from the VAST Challenge map such as Coaster Alley, Tundra Land, etc. Categories include Thrill rides, Kiddie Rides, etc. Type is broken into Outdoor Coaster, Other Ride, Carussel, etc. - Fields: AttractionID, Name, Region, Category, type
sequences:
- The check-in sequences of visitors. These sequences list the position of each visitor to the park every five minutes. If the visitor has not entered the part yet, the sequence has a value of 0 for that time interval. If the visitor is in the park, the sequence lists the attraction they have most recently checked in to until they check in to a new one or leave the park. - Fields: visitorID, sequence
The database is named 'dinofunworld.db' and is located in the 'readonly' directory of the Jupyter Notebook environment. It can be accessed at 'readonly/dinofunworld.db'.
Q1:What ride (note that not all attractions are rides) has the second longest average visit time?
Q2: Compute the Skyline of number of visits and visit time for the park's ride, and report the rides that appear in the Skyline. (Note: Your answer should be three points, which can be given in any order.)
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
