Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Find the average accident severity and count for different types of motorcycles using a SQL statement, specifcially, mySQL. Use column aliases, table aliases This uses
Find the average accident severity and count for different types of motorcycles using a SQL statement, specifcially, mySQL. Use column aliases, table aliases
This uses the Vehicles_2015.csv, Accidents_2015.csv, and Road-Accident-Safety-Data-Guide.xlsx data Note these are large files and you will need to use Python to import the data correction into a SQL server if you want to test your code. Therefore, you can assume the following. The data is stored in three tables (subsections of the outputs are shown below). Accidents 2015 and vehicles 2015 share the accident index field. And vehicles 2015 and vehicle type share the vehicle code field CREATE TABLE accidents_2015 ( Accident index VARCHAR(13) Accident severity INT); 1501BS70001 201501BS70002 3 0150 185700043 0150 1B570005 015018570008 201501BS70009 3 201501BS70010 3 201501B5700113 201501BS70012 CREATE TABLE vehicles 2015 ( Accident index VARCHAR(13) vehicle type VARCHAR(10)); 150 1B570001 19 201501BS70002 9 20150 18570004 9 150 18570005 201501B570008 1 201501BS70008 9 0150 1BS700093 2015018S70009 19 01501B5700109 vcode vtype CREATE TABLE vehicle type ( vcode INT vtype VARCHAR(100)); Pedal cvde Motorcvde 50cc and under Motorcvce 12Scc and under Motorcvcle over 125ce and uo to 500cc Motorcvdle over 500cc Taxd Private hre car Bus or coach (17 or more pass seats) Diagram with connections (use the names in the CREATE TABLEs not from this diagram. index index code vehicle_code vehicle type vehicle typeStep by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started