Spaces:
Runtime error
Runtime error
deps: create the query file
Browse files
notebooks/SQL/Formula1_Data_Analysis_Views.sqlite3-query
ADDED
@@ -0,0 +1,20 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
-- database: ./Spain_2024_FP1.db
|
2 |
+
|
3 |
+
-- Use the ▷ button in the top right corner to run the entire file.
|
4 |
+
|
5 |
+
SELECT * FROM russel;
|
6 |
+
|
7 |
+
-- 1. Driver Performance Summary
|
8 |
+
CREATE VIEW RusselAnalysisPerCompound AS
|
9 |
+
SELECT
|
10 |
+
r.Driver,
|
11 |
+
r.DriverNumber,
|
12 |
+
r.Compound,
|
13 |
+
COUNT(r.LapNumber) AS total_laps,
|
14 |
+
AVG(r.LapTimeSeconds) AS avg_lap_time,
|
15 |
+
MIN(r.LapTimeSeconds) AS best_lap_time,
|
16 |
+
AVG(r.SpeedI1) AS avg_speed_sector1,
|
17 |
+
AVG(r.SpeedI2) AS avg_speed_sector2,
|
18 |
+
AVG(r.SpeedFL) AS avg_speed_sector3
|
19 |
+
FROM russel r
|
20 |
+
GROUP BY r.Compound;
|