Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CH 4 Try it Yourself #2 #29

Open
emiliemercier opened this issue Mar 3, 2021 · 1 comment
Open

CH 4 Try it Yourself #2 #29

emiliemercier opened this issue Mar 3, 2021 · 1 comment
Assignees

Comments

@emiliemercier
Copy link

Hi!

For #2 Try it yourself example in Chapter 4, what would be the statement to file the 20 counties in the United States that have the most housing units. I am confused to what statement would be used to only show the highest 20 without using DESC.

Thank you!

Did you install PostgreSQL and pgAdmin according to the steps on page xxviii of the book's Introduction? If not, please describe your installation.

Which versions of PostgreSQL and pgAdmin 4 are you using? If you aren't sure, for PostgreSQL run the SQL command SELECT version(); and for pgAdmin 4, navigate to "About pgAdmin 4" under the "Help" menu.

Did you download the book's code examples and data from GitHub using the directions on page xxvii of the Introduction? If not, please describe how you loaded the material on your computer.

Issue or Question

Chapter, page and code listing number:

Describe the issue or your question:

Please paste the code and error message here. It's OK to alter identifying info such as a folder name

@anthonydb
Copy link
Owner

Hello @emiliemercier --

You want to use the LIMIT keyword.

You can find that solution with all the Try It Yourself exercises in the below file, which is in the folder of the same name in this repository:

https://github.com/anthonydb/practical-sql/blob/master/Try_It_Yourself/Try_It_Yourself.sql

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants