Question: Language: SQL Pseudocode (SELECT, GROUPBY and JOIN) The following three data tables describe the authors/clients, book titles, and sales to publishers for a certain literary
Language: SQL Pseudocode (SELECT, GROUPBY and JOIN) The following three data tables describe the authors/clients, book titles, and sales to publishers for a certain literary agency:
clients
| cid | first_name | last_name | sign_date | agent |
|---|---|---|---|---|
| jsmith | Jane | Smith | 2001-03-04 | Nelson |
| adory | April | Dory | 2001-03-04 | Paige |
| shu | Simon | Hu | 2003-01-29 | Paige |
| jsmith2 | Jane | Smith | 2006-11-09 | Nelson |
| lortiz | Lorena | Ortiz | 2010-09-26 | Nelson |
titles
| title | author | genre | word_count |
|---|---|---|---|
| The House on the Hill | jsmith | contemporary | 106789 |
| The Blue Diary | jsmith | contemporary | 95019 |
| Dragon Eaters | adory | fantasy | 135501 |
| Silent Wizards | adory | fantasy | 126038 |
| Forbidden Alchemy | adory | fantasy | 111666 |
| My Fathers Piano | shu | memoir | 101365 |
| Blueberry Pastures | jsmith2 | contemporary | 95019 |
| Sudden Confinement | jsmith2 | horror | 95134 |
| Rubi Saves the World | lortiz | young adult | 76045 |
sales
| title | rights | advance | royalty |
|---|---|---|---|
| The House on the Hill | domestic first print | 15000 | 0.125 |
| Dragon Eaters | domestic first print | 12000 | 0.100 |
| Dragon Eaters | foreign markets | 5000 | 0.050 |
| Dragon Eaters | audio | 4000 | 0.075 |
| Blueberry Pastures | domestic first print | 15000 | 0.125 |
| My Fathers Piano | domestic first print | 14500 | 0.100 |
| My Fathers Piano | foreign markets | 14500 | 0.100 |
| Rubi Saves the World | domestic first print | 13500 | 0.110 |
| Rubi Saves the World | audio | 6000 | 0.060 |
Question: Rank the genres from largest advances to smallest advances, using the average advance from domestic first print rights. Provide a SQL-style pseudocode strategy (using relational data concepts such as SELECT, WHERE, GROUP BY, and JOIN) for solving the problem.
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
