-- Activity: SQL practice
-- (no submission)

-- Use an SQL script https://www.cs.virginia.edu/~up3f/cs4750/assigns/cardata.sql 
-- to create and populate three tables of the US vehicle toy database. 
-- (data from https://www.kaggle.com/datasets/doaaalsenani/usa-cers-dataset?resource=download)

-- Write SQL queries to solve the following problems.

-- 1. Find all vehicle brands with the registration years after 2015 that are listed for the state of Virginia. Do not repeat the names of the brands.

-- 2. Find the numbers of vehicles by year. Display only the year with at least 100 vehicles.

-- 3. Find the counts of vehicle brands listed in each state. Sort the result by states.

-- 4. Find the counts of colors for all Jeep MPVs. Display the color and the count of each color.
--    You should consider the number of vehicles in each color; for example, if three Jeep MPVs are black, the count of black color is 3.

-- 5. List VINs of the vehicles with the most expensive price in each state. If there are multiple vehicles with the most expensive price in the state, list them all. Display VINs, states, and prices. Sort the information by state.

-- 6. Find all the brands and models of vehicles with prices between 20,000 and 50,000 (inclusive). Only consider the vehicles that have less than 10,000 miles. Display VIN, brand, model, price, and mileage.
