0% 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
Copyright
© © All Rights Reserved
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% 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
Copyright
© © All Rights Reserved
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
You are on page 1/ 3

Car Name Car Type Miles per Gallon # Cylinders Displacement Horsepower # Gears Flag

Mazda RX4 A 21 6 160 110 4 1


Mazda RX4 Wag B 21 6 160 110 4 1
Datsun 710 C 22.8 4 108 93 4 0
Hornet 4 Drive A 21.4 6 258 110 3 0
Hornet Sportabout C 18.7 8 360 175 3 0
Valiant B 18.1 6 225 105 3 0
Duster 360 D 14.3 8 360 245 3 1
Merc 240D A 24.4 4 146.7 62 4 0
Merc 230 C 22.8 4 140.8 95 4 0
Merc 280 B 19.2 6 167.6 123 4 1
Merc 280C D 17.8 6 167.6 123 4 1
Merc 450SE C 16.4 8 275.8 180 3 0
Merc 450SL A 17.3 8 275.8 180 3 0
Merc 450SLC B 15.2 8 275.8 180 3 0
Cadillac Fleetwood A 10.4 8 472 205 3 1
Lincoln Continental D 10.4 8 460 215 3 1
Chrysler Imperial A 14.7 8 440 230 3 1
Fiat 128 C 32.4 4 78.7 66 4 0
Honda Civic A 30.4 4 75.7 52 4 0
Toyota Corolla B 33.9 4 71.1 65 4 0
Toyota Corona D 21.5 4 120.1 97 3 0
Dodge Challenger A 15.5 8 318 150 3 0
AMC Javelin B 15.2 8 304 150 3 0
Camaro Z28 C 13.3 8 350 245 3 1
Pontiac Firebird A 19.2 8 400 175 3 0
Fiat X1-9 B 27.3 4 79 66 4 0
Porsche 914-2 A 26 4 120.3 91 5 0
Lotus Europa C 30.4 4 95.1 113 5 0
Ford Pantera L B 15.8 8 351 264 5 1
Ferrari Dino B 19.7 6 145 175 5 1
Maserati Bora A 15 8 301 335 5 1
Volvo 142E A 21.4 4 121 109 4 1
Car1
Car2
Car3
S.No.
Q1
Q2
Q3
Q4
Question
Write query to select all the records from table "raw_Data"
Write query to select records from table "raw_Data" where # Cylinders are greater than 4 and Horsepower is more than 100
Write query to select Top 10 Fuel-efficient cars (based on Miles per Gallon)
Write query to find count of cars, average displacement, maximum no. of gears, minimum horsepower for every "Car Type"

You might also like