2.6: Read

In this challenge, you will practice reading data from your Products table. Use the SELECT keyword to write these read statements:

Task

Query Output

Print all Products in a table NOTE: By default, pgAdmin/PostgreSQL return table data in a random order. Therefore, the table in your Query Output may not be identical to the screenshot shown here, and that is fine.

Select all columns in the table using *

Select and return only the ProductName and Price columns from the table

Select and return all Products with a ProductID less than 60

Select and return all Products with a ProductID between 50 and 55; use BETWEEN and AND keywords

Select and return all Products with a ProductDescription that starts with Tool using % and LIKE keyword

Select all Products and return all ProductNames and Prices including a 7% tax; the new price should appear in a temporary "CustomerPays" column

To see the solution for this challenge, click on 2.12 Solutions. Then, continue to Part 2.7: Alter.

Last updated