Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

1. Write a select statement that returns the customer_id, and one column from the customers table named full_name that combines the last name, and the

1. Write a select statement that returns the customer_id, and one column from the customers table named full_name that combines the last name, and the first name of each customer 2. Write a select statement that lists every column from the customers table, but only include rows of customers whose last name contains an "n". 3. Write a select statement that returns all columns from the customers table but only returns rows where the customer's last name starts with "G" 4. Write a select statement that returns the product_name, list_price, and date_added from the Products table. Only return rows where the list price is greater than 500 and less than 2000. Remember there is a distinct difference in the these two sql operators 1. BETWEEN 2. >< 5. For each row in the orders table return the order_id, customer_id, and order_date. Format the order_date so that it displays like this '01/01/99'. Only include orders that don't have a ship_date. 6. Write a select statement that displays each credit card type in the orders table, only display the card type once. 7. Write a select statement that returns the customer_id, line1, line2, and phone_number columns from the addresses table for any customer located in the state of New Jersey or the city of New York. Rename the customer_id column as "NY Area Call List". 8. Write a select statement that returns the product_name and discount percent from the products table. Only return rows with a discount percent greater than or equal to 25 and less than or equal to 30. Don't use <> operators to do this. 9. Write a query that returns the 3 most expensive products in the products table as indicated by list price of the products. 10. Write a select statement that returns the product_id, the product_name, and the first 50 characters of the description from the products table. 11. Write a select statement that returns the product_id, product_name, discount_percent, and list_price columns from the products table, round the discount_percent to one decimal place and the list_price to 0 decimal places 12. Write a select statement that returns all columns from the orders table, but only returns the five newest (most recent) orders in the orders table as shown by the order_date column 13. Write a select statement that returns all columns from the addresses table for customers NOT located in Colorado, California, or Oregon. Use the IN operator to accomplish this 14. List all of the orders in the orders table. Only list orders that have a card type of Visa, a tax amount of 0, and a shipping amount of 5.00 or less 15. Use the REGEXP operator to return all columns and all rows from the addresses table where the street address (line1) column ends in 'Rd.' 16. List only the orders in the orders table that have not been shipped as indicated in the ship_date column.

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Processing Fundamentals Design

Authors: Marion Donnie Dutton Don F. Seaman

14th Edition Globel Edition

1292107634, 978-1292107639

More Books

Students also viewed these Databases questions