Compare commits
10 Commits
56089f396e
...
2bed71011a
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
2bed71011a | ||
|
|
acf4a487b5 | ||
|
|
7aac197f90 | ||
|
|
853d01ba45 | ||
|
|
59b0c5d5aa | ||
|
|
b1c6f98a21 | ||
|
|
3e908d6fb8 | ||
|
|
eaf34ef62e | ||
|
|
88de49ca26 | ||
|
|
b885c2bc01 |
5
10.sql
5
10.sql
@@ -0,0 +1,5 @@
|
||||
-- write a SQL query to answer a question of your choice about the prints. The query should:
|
||||
-- Make use of AS to rename a column
|
||||
-- Involve at least one condition, using WHERE
|
||||
-- Sort by at least one column, using ORDER BY
|
||||
SELECT ROUND(AVG("brightness"), 2) AS "Hiroshige Average Brightness" FROM "views" WHERE "artist" = "Hiroshige";
|
||||
|
||||
3
3.sql
3
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%";
|
||||
|
||||
3
4.sql
3
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%";
|
||||
|
||||
3
5.sql
3
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";
|
||||
|
||||
3
6.sql
3
6.sql
@@ -0,0 +1,3 @@
|
||||
-- write a SQL query to find the average entropy of prints by Hiroshige, rounded to two decimal places.
|
||||
-- Call the resulting column “Hiroshige Average Entropy”.
|
||||
SELECT ROUND(AVG("entropy"), 2) AS "Hiroshige Average Entropy" FROM "views" WHERE "artist" = "Hiroshige";
|
||||
|
||||
3
7.sql
3
7.sql
@@ -0,0 +1,3 @@
|
||||
-- write a SQL query to list the English titles of the 5 brightest prints by Hiroshige, from most to least bright.
|
||||
-- Compare them to this list on Wikipedia to see if your results match the print’s aesthetics.
|
||||
SELECT "english_title" FROM "views" WHERE "artist" = "Hiroshige" ORDER BY "brightness" DESC LIMIT 5;
|
||||
|
||||
3
8.sql
3
8.sql
@@ -0,0 +1,3 @@
|
||||
-- write a SQL query to list the English titles of the 5 prints with the least contrast by Hokusai, from least to highest contrast.
|
||||
-- Compare them to this list on Wikipedia to see if your results match the print’s aesthetics.
|
||||
SELECT "english_title" FROM "views" WHERE "artist" = "Hokusai" ORDER BY "contrast" ASC LIMIT 5;
|
||||
|
||||
Reference in New Issue
Block a user