October 2023
Beginner
398 pages
9h 36m
English
This appendix contains answers to the set of exercises at the end of each chapter. Keep in mind that there are often several ways to arrive at the correct answer, so if your answer doesn’t exactly match what is listed, you may have created an equally correct alternate solution.
Write a query to retrieve the n_nationkey and n_name columns from the Nation table. Sort the rows by n_name values.
PUBLIC>select n_nationkey, n_name from nation order by n_name; +-------------+----------------+ | N_NATIONKEY | N_NAME | |-------------+----------------| | 0 | ALGERIA | | 1 | ARGENTINA | | 2 | BRAZIL | | 3 | CANADA | | 18 | CHINA | | 4 | EGYPT | | 5 | ETHIOPIA | | 6 | FRANCE | | 7 | GERMANY | | 8 | INDIA | | 9 | INDONESIA | | 10 | IRAN | | 11 | IRAQ | | 12 | JAPAN | | 13 | JORDAN | | 14 | KENYA | | 15 | MOROCCO | | 16 | MOZAMBIQUE | | 17 | PERU | | 19 | ROMANIA | | 22 | RUSSIA | | 20 | SAUDI ARABIA | | 23 | UNITED KINGDOM | | 24 | UNITED STATES | | 21 | VIETNAM | +-------------+----------------+ ...
Read now
Unlock full access