Use SQL commands to finish the questions. Please include BOTH SQL commands and results in your answers. 1. List the first and last names of customers with credit limits of $1,000 or more. 2. List the order number for each order placed by customer number 125 on 11/15/2021. 3. List the item ID and description of each item that is not in category ‘HOR’.
Use SQL commands to finish the questions. Please include BOTH SQL commands and results in your answers.
1. List the first and last names of customers with credit limits of $1,000 or more.
2. List the order number for each order placed by customer number 125 on 11/15/2021.
3. List the item ID and description of each item that is not in category ‘HOR’.
4. List the item ID, description, and on-hand value for each item where on-hand value is at least $1,500. Assign the name ON_HAND_VALUE to the computed column. (Hint: On-hand value is the production of the units on hand and price.)
5. Use the IN operator to list the item ID and description of each item in category FSH or BRD or CAT.
6. Find the total of the balances for all customers represented by sales rep 10 with balances that are less than their credit limits.
7. List the item ID, description, and on-hand value of each item whose number of units on hand is more than the average number of units on hand for all items. (Hint: Use a subquery.)
8. What is the price of the least expensive item in the
9. List the sum of the balances of all customers for each sales rep but restrict the output to those sales reps for which the sum is more than $150. Order the results by sales rep ID.
10. List the item ID of any item with an unknown description.
SQL :
SQL (Structured Query Language) is a programming language used to manage and manipulate relational databases. Here are some common SQL commands:
- SELECT: This command is used to retrieve data from one or more tables in a database.
- INSERT: This command is used to add new data to a table.
- UPDATE: This command is used to modify existing data in a table.
- DELETE: This command is used to remove data from a table.
- CREATE TABLE: This command is used to create a new table in a database.
- DROP TABLE: This command is used to delete a table from a database.
- ALTER TABLE: This command is used to modify the structure of an existing table.
- CREATE INDEX: This command is used to create an index on one or more columns of a table to speed up data retrieval.
- GROUP BY: This command is used to group rows in a table based on one or more columns.
- ORDER BY: This command is used to sort the result set of a query in ascending or descending order based on one or more columns.
- JOIN: This command is used to combine rows from two or more tables based on a related column between them.
- DISTINCT: This command is used to retrieve only unique values from a column.
- WHERE: This command is used to filter data based on a specified condition.
- HAVING: This command is used to filter the result set of a GROUP BY query based on a specified condition.
- LIMIT: This command is used to limit the number of rows returned by a query.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps
Please solve question no. 10 including screenshots of SQL results.
Need help with solutions to questions 7 to 9.
Only answered 3 questions. The other 7 are missing.