Here are the SQL queries for the questions:
1. Select all records from raw_Data table:
SELECT * FROM raw_Data;
2. Select records where #Cylinders > 4 and Horsepower > 100:
SELECT * FROM raw_Data
WHERE # Cylinders > 4 AND Horsepower > 100;
3. Select top 10 fuel efficient cars based on Miles per Gallon:
SELECT * FROM raw_Data
ORDER BY Miles_per_Gallon DESC
LIMIT 10;
4. Find count, avg displacement, max gears, min horsepower for each Car Type:
SELECT Car_Type,
COUNT(*) AS count,
AVG
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as XLSX, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
69 views3 pages
BI Bootcamp Test - Week1
Here are the SQL queries for the questions:
1. Select all records from raw_Data table:
SELECT * FROM raw_Data;
2. Select records where #Cylinders > 4 and Horsepower > 100:
SELECT * FROM raw_Data
WHERE # Cylinders > 4 AND Horsepower > 100;
3. Select top 10 fuel efficient cars based on Miles per Gallon:
SELECT * FROM raw_Data
ORDER BY Miles_per_Gallon DESC
LIMIT 10;
4. Find count, avg displacement, max gears, min horsepower for each Car Type:
SELECT Car_Type,
COUNT(*) AS count,
AVG