Problem 2: By Parent Height (100 pts)
Create a table by_parent_height
that has a column of the names of all dogs that have a parent
, ordered by the height of the parent from tallest parent to shortest parent.
-- All dogs with parents ordered by decreasing height of their parent
CREATE TABLE by_parent_height AS
SELECT "REPLACE THIS LINE WITH YOUR SOLUTION";
For example, fillmore
has a parent (eisenhower
) with height 35, and so should appear before grover
who has a parent (fillmore
) with height 32.
sqlite> select * from by_parent_height;
herbert
fillmore
abraham
delano
grover
barack
clinton
Hint: You might want to review the joins section.