commit 24646122c0b15ff55dc16924d60d352ab442b8c9 Author: bot50 Date: Wed Apr 15 08:38:49 2026 +0000 daviddoji-cs50/problems/2024/sql/players@20260415T083849.151931134Z diff --git a/1.sql b/1.sql new file mode 100644 index 0000000..c759e40 --- /dev/null +++ b/1.sql @@ -0,0 +1,2 @@ +-- write a SQL query to find the hometown (including city, state, and country) of Jackie Robinson. +SELECT "birth_city", "birth_state", "birth_country" FROM "players" WHERE "first_name" = "Jackie" AND "last_name" = "Robinson"; diff --git a/10.sql b/10.sql new file mode 100644 index 0000000..e69de29 diff --git a/2.sql b/2.sql new file mode 100644 index 0000000..edfd0b7 --- /dev/null +++ b/2.sql @@ -0,0 +1,2 @@ +-- write a SQL query to find the side (e.g., right or left) Babe Ruth hit. +SELECT "bats" FROM "players" WHERE "first_name" = "Babe" AND "last_name" = "Ruth"; diff --git a/3.sql b/3.sql new file mode 100644 index 0000000..462576d --- /dev/null +++ b/3.sql @@ -0,0 +1,2 @@ +-- write a SQL query to find the ids of rows for which a value in the column debut is missing. +SELECT "id" FROM "players" WHERE "debut" IS NULL; diff --git a/4.sql b/4.sql new file mode 100644 index 0000000..90b1ea3 --- /dev/null +++ b/4.sql @@ -0,0 +1,3 @@ +-- write a SQL query to find the first and last names of players who were not born in the United States. +-- Sort the results alphabetically by first name, then by last name. +SELECT "first_name", "last_name" FROM "players" WHERE "birth_country" != "USA" ORDER BY "first_name" ASC, "last_name" ASC; diff --git a/5.sql b/5.sql new file mode 100644 index 0000000..1779604 --- /dev/null +++ b/5.sql @@ -0,0 +1,3 @@ +-- write a SQL query to return the first and last names of all right-handed batters. +-- Sort the results alphabetically by first name, then by last name. +SELECT "first_name", "last_name" FROM "players" WHERE "bats" = "R" ORDER BY "first_name" ASC, "last_name" ASC; diff --git a/6.sql b/6.sql new file mode 100644 index 0000000..dfe1cce --- /dev/null +++ b/6.sql @@ -0,0 +1,3 @@ +-- write a SQL query to return the first name, last name, and debut date of players born in Pittsburgh, Pennsylvania (PA). +-- Sort the results first by debut date—from most recent to oldest—then alphabetically by first name, followed by last name. +SELECT "first_name", "last_name", "debut" FROM "players" WHERE "birth_city" = "Pittsburgh" ORDER BY "debut" DESC, "first_name" ASC, "last_name" DESC; diff --git a/7.sql b/7.sql new file mode 100644 index 0000000..e69de29 diff --git a/8.sql b/8.sql new file mode 100644 index 0000000..e69de29 diff --git a/9.sql b/9.sql new file mode 100644 index 0000000..e69de29