Question

Create an SQL query for the following: Show all fields of any records with Express Air...

Create an SQL query for the following:

Show all fields of any records with Express Air as ShipMode if the OrderPriority is either high or critical.

All of these fields are in a table names Invoices.

Homework Answers

Answer #1

SQL Query :

SELECT * FROM Invoices WHERE ShipMode = 'Express Air' and OrderPriority IN ('high', 'critical');

Explanation:

1. Here, we have used the WHERE clause to find the rows in the table which has  ShipMode as Express Air.

2. To find the rows in a table which has OrderPriority is either high or critical, we used the IN operator as OrderPriority IN ('high', 'critical').

3. To find the common rows which as ShipMode as Express Air and OrderPriority is either high or critical, we have used the and operator.

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
First issue: a) I am trying to create a SQL query so i can list all...
First issue: a) I am trying to create a SQL query so i can list all the items that a user has bought b)I am trying to show how much it will cost in total for user My tables: Table user(user_id, username, shipping_address) Table item(item_id, item, pricing) Table receipt(r_id, user_id, date_current) Table rDetailing(r_id, item_id, item_in, amount_of_item)
Specify the following queries in SQL on the COMPANY database. Show the result of each query....
Specify the following queries in SQL on the COMPANY database. Show the result of each query. Retrieve the names of all employees in department 5 who work more than 10 hours per week on the ‘ProductX’ project. List the names of all employees who have a dependent with the same first name as themselves. Find the names of all employees who are directly supervised by ‘Franklin Wong’. Specify the following updates using the SQL update commands. Show the state of...
Build an SQL query to answer the following questions: What is the number of students tutored...
Build an SQL query to answer the following questions: What is the number of students tutored by each tutor? If the tutor has not tutored any student, your result should show 0 as the number of students tutored.
Use the following tables to answer Q5 and Q6. Tourist (tno, Name, phone, age,loc) Vehicle (Vno,...
Use the following tables to answer Q5 and Q6. Tourist (tno, Name, phone, age,loc) Vehicle (Vno, model, mileage, owner_name, owner_ph)) Rented (tno, Vno) 5. (i)Write an SQL query, to create the table vehicle with following constraints: Vno should begin with second letter ‘v’; Models are one among Thar, X3. Mileage should be above 18 and below 25. No two records can have same phone (ii) Write an SQL query to retrieve the name of the owner who does owns X3...
PLEASE USE MICROSOFT SQL SERVER MANAGEMENT STUDIO 18 The purpose of this task is to create...
PLEASE USE MICROSOFT SQL SERVER MANAGEMENT STUDIO 18 The purpose of this task is to create a student table such that it has 2 partitions. One that will include all student id's through 500 and a second one that will include all student id's above 500. StudentID                   int           StudentName              varchar(30) *StudentID should be a a primary key. **StudentName should be required. Do you not use the master filegroup. Each partition should be associated with a different physical file. Use any...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s...
Write a script to create the following tables with attributes as specified(SQL) Customer table with Customer’s id, name, address, city as varchar, customer’s date of birth as date type and zip code number where the customers id is the primary key in the table, name and date of birth are mandatory. Id has a 10-character limit, name, address and city have a 50-character limit, zip has a 5-character limit Product Table with Product id, description and finish as varchar, price...
How can you show that electric currents create magnetic fields? Check all that apply. If you...
How can you show that electric currents create magnetic fields? Check all that apply. If you place two wires with currents perpendicular to each other, they will be attracted each other. If you place a magnet near a closed circuit with current flowing, it will exert a force on the circuit wires. If you place a coil of wire near a magnet and direct a current through the coil, it will exert a force on the magnet, depending on its...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment...
Question 1: Group by and Aggregates: Write SQL statements to answer the following questions using Assignment 4’s schema (Customer-Invoice-Line-Product-Vendor). Make sure that your SQL script runs without any errors. Submit your answers in a .SQL file. 1 (2 Points) - Find the count of distinctvendors thatsupplied products that are priced lowerthan 185? 2 (2 Points) - For each vendor, find their product that has the lowest product quantity. Your output should include vendor code, vendor name, product description and product...
SQL A manufacturing company’s data warehouse contains the following tables. Region region_id (p) region_name super_region_id (f)...
SQL A manufacturing company’s data warehouse contains the following tables. Region region_id (p) region_name super_region_id (f) 101 North America 102 USA 101 103 Canada 101 104 USA-Northeast 102 105 USA-Southeast 102 106 USA-West 102 107 Mexico 101 Note: (p) = "primary key" and (f) = "foreign key". They are not part of the column names. Product product_id (p) product_name 1256 Gear - Large 4437 Gear - Small 5567 Crankshaft 7684 Sprocket Sales_Totals product_id (p)(f) region_id (p)(f) year (p) month (p)...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL...
EMPLOYEE Field Name EMP_ID EMP_LNAME EMP_MI EMP_FNAME EMP_SEX EMP_AGE EMP_SALARY EMP_HIREDATE DEPT_CODE Table: DEPARTMENT DEPT_CODE BIOL CPTR HIST MATH RELB Data Type Text Text Text Text Text Number Currency Date/Time Text DEPT_TITLE Biology Computer Science History Mathematics Religion    Field Name DEPT_CODE DEPT_TITLE Data Type Text Text INSTRUCTIONS Use SQL commands to create the tables and enter the data shown above using MS Access. Write the following SQL statement given below: 1. 2. 3. 4. 5. 6. 7. 8. 9....
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT