From ee62cb602cb029f65164362fd4636ab262ec717b Mon Sep 17 00:00:00 2001 From: bot50 Date: Mon, 13 Apr 2026 14:46:53 +0000 Subject: [PATCH] daviddoji-cs50/problems/2024/sql/views@20260413T144653.915930326Z --- 1.sql | 3 +++ 10.sql | 0 2.sql | 3 +++ 3.sql | 3 +++ 4.sql | 3 +++ 5.sql | 3 +++ 6.sql | 0 7.sql | 0 8.sql | 0 9.sql | 0 10 files changed, 15 insertions(+) create mode 100644 1.sql create mode 100644 10.sql create mode 100644 2.sql create mode 100644 3.sql create mode 100644 4.sql create mode 100644 5.sql create mode 100644 6.sql create mode 100644 7.sql create mode 100644 8.sql create mode 100644 9.sql diff --git a/1.sql b/1.sql new file mode 100644 index 0000000..7fd2559 --- /dev/null +++ b/1.sql @@ -0,0 +1,3 @@ +-- write a SQL query that a translator might take interest in: list, side by side, the Japanese title and the +-- English title for each print. Ensure the Japanese title is the first column, followed by the English title. +SELECT "japanese_title", "english_title" FROM "views"; 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..1873ad9 --- /dev/null +++ b/2.sql @@ -0,0 +1,3 @@ +-- write a SQL query to list the average colors of prints by Hokusai that include “river” in the English title. +-- (As an aside, do they have any hint of blue?) +SELECT "average_color" FROM "views" WHERE "artist" = "Hokusai" AND "english_title" LIKE "%river%"; diff --git a/3.sql b/3.sql new file mode 100644 index 0000000..ccc0230 --- /dev/null +++ b/3.sql @@ -0,0 +1,3 @@ +-- write a SQL query to count how many prints by Hokusai include “Fuji” in the English title. +-- Though all of Hokusai’s prints focused on Mt. Fuji, in how many did “Fuji” make it into the title? +SELECT COUNT(*) FROM "views" WHERE "artist" = "Hokusai" AND "english_title" LIKE "%Fuji%"; diff --git a/4.sql b/4.sql new file mode 100644 index 0000000..7116d98 --- /dev/null +++ b/4.sql @@ -0,0 +1,3 @@ +-- write a SQL query to count how many prints by Hiroshige have English titles that refer to the “Eastern Capital”. +-- Hiroshige’s prints were created in Japan’s “Edo period,” referencing the eastern capital city of Edo, now Tokyo. +SELECT COUNT(*) FROM "views" WHERE "artist" = "Hiroshige" AND "english_title" LIKE "%Eastern%Capital%"; diff --git a/5.sql b/5.sql new file mode 100644 index 0000000..ce88339 --- /dev/null +++ b/5.sql @@ -0,0 +1,3 @@ +-- write a SQL query to find the highest contrast value of prints by Hokusai. Name the column “Maximum Contrast”. +-- Does Hokusai’s prints most contrasting print actually have much contrast? +SELECT MAX("contrast") AS "Maximum Contrast" FROM "views"; diff --git a/6.sql b/6.sql new file mode 100644 index 0000000..e69de29 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