
CREATE TABLE race (
	"Race_ID" INTEGER, 
	"Name" TEXT, 
	"Class" TEXT, 
	"Date" TEXT, 
	"Track_ID" TEXT, 
	PRIMARY KEY ("Race_ID"), 
	FOREIGN KEY("Track_ID") REFERENCES track ("Track_ID")
)


CREATE TABLE track (
	"Track_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"Seating" REAL, 
	"Year_Opened" REAL, 
	PRIMARY KEY ("Track_ID")
)

CREATE TABLE race (
	"Race_ID" INTEGER, 
	"Name" TEXT, 
	"Class" TEXT, 
	"Date" TEXT, 
	"Track_ID" TEXT, 
	PRIMARY KEY ("Race_ID"), 
	FOREIGN KEY("Track_ID") REFERENCES track ("Track_ID")
)

/*
2 rows from race table:
Race_ID	Name	Class	Date	Track_ID
1	Rolex 24 At Daytona	DP/GT	January 26 January 27	1
2	Gainsco Grand Prix of Miami	DP/GT	March 29	2
*/


CREATE TABLE track (
	"Track_ID" INTEGER, 
	"Name" TEXT, 
	"Location" TEXT, 
	"Seating" REAL, 
	"Year_Opened" REAL, 
	PRIMARY KEY ("Track_ID")
)

/*
2 rows from track table:
Track_ID	Name	Location	Seating	Year_Opened
1	Auto Club Speedway	Fontana, CA	92000.0	1997.0
2	Chicagoland Speedway	Joliet, IL	75000.0	2001.0
*/
What is the race class with most number of races.
SELECT CLASS FROM race GROUP BY CLASS ORDER BY count(*) DESC LIMIT 1
[{'Class': 'DP/GT'}]