bot50
2026-04-13 13:28:47 +00:00
commit e042f9c7e2
13 changed files with 28 additions and 0 deletions

2
1.sql Normal file
View File

@@ -0,0 +1,2 @@
-- write a SQL query to list the titles of all episodes in Cyberchases original season, Season 1.
SELECT "title" FROM "episodes" WHERE "season" = 1;

2
10.sql Normal file
View File

@@ -0,0 +1,2 @@
-- write a SQL query to list the ids, titles, and production codes of all episodes. Order the results by production code, from earliest to latest.
SELECT "id", "title", "production_code" FROM "episodes" ORDER BY "production_code" ASC;

2
11.sql Normal file
View File

@@ -0,0 +1,2 @@
-- list the titles of episodes from season 5, in reverse alphabetical order.
SELECT "title" FROM "episodes" WHERE "season" = 5 ORDER BY "title" DESC;

2
12.sql Normal file
View File

@@ -0,0 +1,2 @@
-- count the number of unique episode titles.
SELECT COUNT(DISTINCT "title") FROM "episodes";

3
13.sql Normal file
View File

@@ -0,0 +1,3 @@
-- write a SQL query to explore a question of your choice. This query should:
-- Involve at least one condition, using WHERE with AND or OR
SELECT "title" FROM "episodes" WHERE "season" = 1 AND "topic" LIKE "%and%"

2
2.sql Normal file
View File

@@ -0,0 +1,2 @@
-- list the season number of, and title of, the first episode of every season.
SELECT "season", "title" FROM "episodes" WHERE "episode_in_season" = 1;

2
3.sql Normal file
View File

@@ -0,0 +1,2 @@
-- find the production code for the episode “Hackerized!”.
SELECT "production_code" FROM "episodes" WHERE "title" = "Hackerized!";

2
4.sql Normal file
View File

@@ -0,0 +1,2 @@
-- write a query to find the titles of episodes that do not yet have a listed topic.
SELECT "title" FROM "episodes" WHERE "topic" IS NULL;

2
5.sql Normal file
View File

@@ -0,0 +1,2 @@
-- find the title of the holiday episode that aired on December 31st, 2004.
SELECT "title" FROM "episodes" WHERE "air_date" = "2004-12-31";

2
6.sql Normal file
View File

@@ -0,0 +1,2 @@
-- list the titles of episodes from season 6 (2008) that were released early, in 2007.
SELECT "title" FROM "episodes" WHERE "season" = 6 AND "air_date" LIKE "2007%";

2
7.sql Normal file
View File

@@ -0,0 +1,2 @@
-- write a SQL query to list the titles and topics of all episodes teaching fractions.
SELECT "title", "topic" FROM "episodes" WHERE "topic" LIKE "%Fractions%";

3
8.sql Normal file
View File

@@ -0,0 +1,3 @@
-- write a query that counts the number of episodes released in the last 6 years, from 2018 to 2023, inclusive.
-- You might find it helpful to know you can use BETWEEN with dates, such as BETWEEN '2000-01-01' AND '2000-12-31'.
SELECT COUNT("title") FROM "episodes" WHERE "air_date" BETWEEN "2018-01-01" AND "2023-12-31";

2
9.sql Normal file
View File

@@ -0,0 +1,2 @@
-- write a query that counts the number of episodes released in Cyberchases first 6 years, from 2002 to 2007, inclusive.
SELECT COUNT("title") FROM "episodes" WHERE "air_date" BETWEEN "2002-01-01" AND "2007-12-31";