Question

databases Write a SQL query that shows the OrderID, OrderDate, CustomerID, TotalAmount, ProductID, Quantity for orders...

databases

Write a SQL query that shows the OrderID, OrderDate, CustomerID, TotalAmount, ProductID, Quantity for orders with a TotalAmount of 1000 and above. The results need to be sorted by TotalAmount in ascending order.

Homework Answers

Answer #1

Select Query for getting all the orders:

select * from Orders;

Select Query for getting all the orders with totalamount>=1000

select * from Orders WHERE totalamount>=1000;

Select Query for getting all the orders with totalamount>=1000 in ascending order

select * from Orders WHERE totalamount>=1000 ORDER BY totalamount ASC;

Screenshots for additional help:

for all orders

for order whose totalAmount>=1000

I HOPE THIS WILL HELP. THANKS.

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
Assignment 2 Instructions You need to access to the database and write SQL queries on the...
Assignment 2 Instructions You need to access to the database and write SQL queries on the following site: https://www.w3schools.com/sql/trysql.asp?filename=trysql_op_in 1. Use INNER JOIN to create a report. In this report, list each customer’s CustomerID, CustomerName, and their each OrderID and each order’s OrderDate, if the customer has ever placed an order. You should use the Customers table and the Orders table in the database to complete this query.   2. Use INNER JOIN to create a report. In this report, list...
7.11E Write an SQL query that retrieves the total available quantity of sparkling wines. Make sure...
7.11E Write an SQL query that retrieves the total available quantity of sparkling wines. Make sure to display this quantity as “TOTAL_QUANTITY” 7.12E Write a query to select all supplier numbers, together with their supplier name and total number of outstanding orders for each supplier. Include all suppliers in the result, even if there are no outstanding orders for that supplier at the moment. 7.17E Write an SQL query with ALL or ANY to retrieve the name of the product...
Assignment Instructions (MY WORK IN MYSQLBENCH)- Follow instructions in class to download and build a database...
Assignment Instructions (MY WORK IN MYSQLBENCH)- Follow instructions in class to download and build a database in your DBMS. Write and demonstrate queries (in-class) that do the following: Download the appropriate attached SQL file for your DBMS. Load the file into your database design tool and run it to build the Pine Valley Furniture Company database. This is the database that is used in the textbook examples for both Chapters 5 and 6. Write a query to show the price...
How to write a query in SQL to determine the outliers of the data set in...
How to write a query in SQL to determine the outliers of the data set in the correct change column. There are 6 columns ID, gender, treatment, start_weight_kg, end_weight_kg, correct change. I need to find the numbers that are greater than -30 in the correct change column. Table name is JerkyDietPlan
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique...
Using CIS495 sample database, write the SQL query: a. In the orderdetails table, list the unique order which has more than 3 productCode in each order. b. List the customer name and address who purchase more than 5 items (ProductCode) in the order.  
Write a SQL statement for the following query: Relational Schema: Part( P #, PName, Producer, Year,...
Write a SQL statement for the following query: Relational Schema: Part( P #, PName, Producer, Year, Price) (P# is the primary key) Customer( C#, CName, City) (C# is the primary key) Supply(S#, P#, C#, Quantity, Amount, Date) (S# is the primary key) Query: For each Apple product supplied to more than 10 different customers in Chicago in 2020, list product number, product name, total supply quantity, and total supply amount. Sort the result by product name.
Write code in SQL. Q1) By looking at city table. Write a query that identify the...
Write code in SQL. Q1) By looking at city table. Write a query that identify the in how many cities the company has branches. Rename the column name to TotalNumberOfCities. You have to look at city table and write a query to count number of rows. Q2) By looking at film table. How many films we have that its description contains the word "Robot". Count number of films and rename the column to NumberofRobots Q3) By looking at film table....
Open the World database on MySQL. Write the SQL code to display the name and population...
Open the World database on MySQL. Write the SQL code to display the name and population of all cities that meet two conditions: a.) the city has a population more than 100,000; and b.) the city name has (anywhere) the letter a followed by any character followed by the letter z. Use a regular expression for the second condition. Sequence the query results in descending order by population. What is the city with the largest population in the output?
Subtask 10.2.1 Run the following JOIN of two tables which has two restrictions. Examine the output...
Subtask 10.2.1 Run the following JOIN of two tables which has two restrictions. Examine the output – is this what you expect? Prefix the query with “EXPLAIN EXTENDED” and review the output. SQL EXPLAIN EXTENDED SELECT * FROM Orders NATURAL JOIN Order_Details WHERE QuotedPrice > 1000 AND OrderDate BETWEEN '2012-10-01' AND '2012-10-31'; Examine the query plan output with the help of the column explanations given above. Describe in your own words how the DBMS is fetching the rows. For each...
Write a SQL update statement that changes the grade for student 4456 who passed the course...
Write a SQL update statement that changes the grade for student 4456 who passed the course Discrete Math in semester 2017Sp. Change the grade from C to B.   For full credit you should have a single update statement that has a where clause that verifies that the current grade is C. Use ap as the Schema Table to find your answer whoevr is solving this problem thank you. heres wht i needu to do. Thge question is the bold part...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT