#SQL Lab
##Getting Started
To get started we'll need to import the booktown.sql file.
- open terminal
- use the command
psql -f booktown.sql
- type
sql
to open your psql console - type \list to ensure the booktown database was successfully completed
##Instructions Provide the follow sql statements below each question.
##Order
- Find all subjects sorted by subject
- Find all subjects sorted by location
##Where
- Find the book "Little Women"
- Find all books containing the word "Python"
- Find all subjects with the location "Main St" sort them by subject
##Joins
- Find all books about Computers list ONLY book title
-
Find all books and display ONLY
- Book title
- Author's first name
- Author's last name
- Book subject
-
Find all books that are listed in the stock table
- Sort them by retail price (most expensive first)
- Display ONLY: title and price
-
Find the book "Dune" and display ONLY
- Book title
- ISBN number
- Publisher name
- Retail price
-
Find all shipments sorted by ship date display ONLY:
- Customer first name
- Customer last name
- ship date
- book title
-
Find all books that have either a 2nd or 3rd edition associated to it display ONLY:
- Book title
- Book Author
- Edition Number