Car Dealer Project

You must execute the code again to save those values in the database.
SalespersonIDFirstNameLastName
1JohnDoe
2JaneSmith
3BobJohnson

TransactionIDVehicleIDSalespersonIDSaleDate
1112023-03-01
2222023-03-02
3312023-03-03
4432023-03-03
5522023-03-04
6622023-03-04
7722024-03-04
8832024-03-04
9932024-03-04
101022024-03-04
111112024-03-04
121222024-03-04

Section
Q1: Shows the types of cars that can be sold. From the most sold to the least.

VehicleTypeTotalSales
SUV5
Sedan3
Hatchback2
Truck1

Section
Q2: Show the salesperson (First and last name) who sold the most cars and how many cars they sold

FirstNameLastNameTotalTransactions
JaneSmith6
JohnDoe3
BobJohnson3

Section
Q3: Calculate the total sales of each salesperson.

FirstNameLastNameTotalRevenue
JaneSmith8500000.0
BobJohnson4700000.0
JohnDoe3300000.0

Section
Q4: In 2023, between electric cars (Electric) or fuel-powered cars (Petrol), which is more popular?

FuelTypeTotalSales
Electric3
Petrol2

Section
Q5: Classified as a Flagship Model.

ModelNameModelLabel
Hatchback BNormal Model
Hatchback CFlagship Model
SUV AFlagship Model
SUV BFlagship Model
SUV XFlagship Model
SUV YFlagship Model
SUV ZFlagship Model
Sedan AFlagship Model
Sedan CNormal Model
Sedan XFlagship Model
Truck YFlagship Model