Share
Explore BrainMass

Access SQL queries

sing the Microsoft Access database Teresa'sTrees, write SQL statements for the given tasks. Once complete, copy the SQL statements from Microsoft Access and paste them in a Microsoft Word document that will be submitted along with part II of the assignment.

Write an SQL statement:

To display all the information from the Customer table
To display each shipping date for customer 1 from the Invoice table
Note: Display both the customer number and the shipping date.

To display the names of all the trees that cost at least $200.00
To display all the information for invoice number 2
To list the phone and last name of all customers
To list the phone, first name, and last name of all customers whose last name starts with "J"
To return the number of customers
To determine the average total invoice amount
To show all the items ordered from invoice number 3
To show the first and last names along with the invoice number of all customers with an invoice of at least $250.00

Attachments

Solution Preview

See attached

Write an SQL statement:

• To display all the information from the Customer table
SELECT * FROM Customer
• To display each shipping date for customer 1 from the Invoice table
Note: Display both the customer number and the shipping date.
SELECT CustomerID, DateOut
FROM Invoice
WHERE CustomerID = 1
• To display the names of all the trees ...

Solution Summary

Multiple example queries are shown for a multi-table Access database. This includes joins, average values, and row counts.

$2.19