Answered You can hire a professional tutor to get the answer.
CLASSIFICATION_TYPES PEOPLE REGISTRATIONS classification_type_id INT #-- OF_TYPE person_id INT registration_id INT classification VARCHAR(45)
I need help finding the correct SQL statement to answer the following question using the SQL script and ERD found below:
9) Make a report of all cars who were parked illegally. List the license_plate numbers and times they were found parked illegally.
FOUND_IN_LOT; ALLOWS_PARKING_IN; PARKING_LOTS; REGISTERED_VEHICLES; VEHICLES; REGISTRATIONS; PEOPLE; DEPARTMENTS; CLASSIFICATION_TYPES; CLASSIFICATION_TYPES (classification_type_id primary auto_increment,classification () ) =; DEPARTMENTS (department_id primary auto_increment,dept_name () ) =; PEOPLE (person_id primary auto_increment,last_name () ,first_name () ,middle_initial () ,department_id ,phone_extension () ,ssn_last_4 (,) ,classification_type_id , fk_of_type foreign (classification_type_id) CLASSIFICATION_TYPES (classification_type_id), fk_works_for foreign (department_id) DEPARTMENTS (department_id)) =; REGISTRATIONS (registration_id primary auto_increment,permit_a () ,permit_b () ,signature , ,person_id ,valid_starting ,valid_ending , fk_holds foreign (person_id) PEOPLE (person_id)) =; VEHICLES (license_tag () primary ,make () , () , ) =; REGISTERED_VEHICLES (registration_id ,license_tag (),primary_vehicle ,primary (registration_id, license_tag), fk_registeration_of_vehicle foreign (registration_id) REGISTRATIONS(registration_id), fk_vehicle_that_is_registered foreign (license_tag) VEHICLES(license_tag)) =; PARKING_LOTS (parking_lot_id primary auto_increment,lot_name () ,num_of_spaces ) =; ALLOWS_PARKING_IN (registration_id ,parking_lot_id ,primary (registration_id, parking_lot_id), fk_registration_of_lot foreign (registration_id) REGISTRATIONS(registration_id), fk_registered_lot foreign (parking_lot_id) PARKING_LOTS(parking_lot_id)) =; FOUND_IN_LOT (license_tag (),parking_lot_id ,datetime DATETIME ,primary (license_tag, parking_lot_id, datetime), fk_vehicle_in_lot foreign (license_tag) VEHICLES(license_tag), fk_lot_for_vehicle foreign (parking_lot_id) PARKING_LOTS (parking_lot_id)) =; CLASSIFICATION_TYPES (classification_type_id, classification) (, ); CLASSIFICATION_TYPES (classification_type_id, classification) (, ); CLASSIFICATION_TYPES (classification_type_id, classification) (, ); CLASSIFICATION_TYPES (classification_type_id, classification) (, ); DEPARTMENTS (department_id, dept_name) (, ); DEPARTMENTS (department_id, dept_name) (, ); DEPARTMENTS (department_id, dept_name) (, ); DEPARTMENTS (department_id, dept_name) (, ); DEPARTMENTS (department_id, dept_name) (, ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); PEOPLE (person_id, last_name, first_name, middle_initial,department_id, phone_extension, ssn_last_4, classification_type_id) (, , , , , , , ); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); REGISTRATIONS (registration_id, permit_a, permit_b, , person_id,valid_starting, valid_ending) (,,,,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); VEHICLES (license_tag, make, , ) (,,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); REGISTERED_VEHICLES (registration_id, license_tag, primary_vehicle) (,,); PARKING_LOTS (parking_lot_id, lot_name, num_of_spaces) (,,); PARKING_LOTS (parking_lot_id, lot_name, num_of_spaces) (,,); PARKING_LOTS (parking_lot_id, lot_name, num_of_spaces) (,,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); ALLOWS_PARKING_IN (registration_id, parking_lot_id) (,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); FOUND_IN_LOT (license_tag, parking_lot_id, datetime) (,,); * CLASSIFICATION_TYPES; * PEOPLE; * REGISTRATIONS; * VEHICLES; * REGISTERED_VEHICLES; DEPARTMENTS; CLASSIFICATION_TYPES; PEOPLE; REGISTRATIONS; VEHICLES; REGISTERED_VEHICLES; PARKING_LOTS; ALLOWS_PARKING_IN; FOUND_IN_LOT;CLASSIFICATION_TYPESPEOPLEREGISTRATIONSclassification_type_id INT#-- OF_TYPEperson_id INTregistration_id INTclassification VARCHAR(45)last_name VARCHAR(45)permit_a VARCHAR(45)REGISTERED_VEHICLESfirst_name VARCHAR(45)HOLDSpermit_b VARCHAR(45)registration_id INT (FK)middle_initial CHAR(1)-Of signature BLOBlicense_tag VARCHAR(10) (FK)DEPARTMENTSWORKS_FORphone_extension CHAR(6)date DATEprimary_vehicle BOOLEANdepartment_id INTssn_last_4 DECIMAL(4,0)person_id INT (FK)dept_name VARCHAR(45)classification_type_id INT (FK)valid_starting DATEdepartment_id INT (FK)valid_ending DATEVEHICLESlicense_tag VARCHAR(10)ALLOWS_PARKING_INmake VARCHAR(45)registration_id INT (FK)model VARCHAR(45)parking_lot_id INT (FK)year YEARPARKING_LOTSFOUND_IN LOTparking_lot_id INTlicense_tag VARCHAR(10) (FK)lot_name VARCHAR(45)LOs parking_lot_id INT (FK)num_of_spaces INTdatetime DATETIME