Using database ProductOrders as following: Products Customers Column Name Condensed Type Column Name Condensed Type nvarchar(5)...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Using database "ProductOrders" as following: Products Customers Column Name Condensed Type Column Name Condensed Type nvarchar(5) nvarchar (30) * ProductCode Y CustomerID nvarchar(5) Name Name nvarchar(30) Price float Address nvarchar (50) StockQuantity int Phone nvarchar(10) Email nvarchar(30) OrderItems Orders Column Name Condensed Type Column Name Condensed Type Y OrderID * ProductCode nvarchar(10) 8 OrderID nvarchar(10) nyarchar(5) Date date Quantity int Customer ID nvarchar (5) Discount float Amount float SelPrice float I. Simple SQL queries: In the database "ProductOrders" created in the previous exercise, write the following queries: 1. Find all Products in the database 2. Find the name and the phone number of all customers who live in 'BINH CHANH' 3. Show the Name, Price, StockQuantity and Amount (which is equal to StockQuantity * Price) of all Products having Amount < 20000. 4. Find all customers who lives in 'BINH CHANH' or 'TAN BINH' 5. Find all Products having 10<= Price <= 45 6. Find all customers who have a phone number. 7. Find months and years in which customer 'C01' made at least an order. 8. Find all customers whose name begin with 'TRAN '. 9. Find all LCD monitor products. 10. Find the CustomerlID of all customer who made orders in May 2000. 11. List all Products by descending order of Price. 12. List all customer by descending order of Address, with customers having same address we order by ascending order of Name. 13. Find the product with the highest Price. Using database "ProductOrders" as following: Products Customers Column Name Condensed Type Column Name Condensed Type nvarchar(5) nvarchar (30) * ProductCode Y CustomerID nvarchar(5) Name Name nvarchar(30) Price float Address nvarchar (50) StockQuantity int Phone nvarchar(10) Email nvarchar(30) OrderItems Orders Column Name Condensed Type Column Name Condensed Type Y OrderID * ProductCode nvarchar(10) 8 OrderID nvarchar(10) nyarchar(5) Date date Quantity int Customer ID nvarchar (5) Discount float Amount float SelPrice float I. Simple SQL queries: In the database "ProductOrders" created in the previous exercise, write the following queries: 1. Find all Products in the database 2. Find the name and the phone number of all customers who live in 'BINH CHANH' 3. Show the Name, Price, StockQuantity and Amount (which is equal to StockQuantity * Price) of all Products having Amount < 20000. 4. Find all customers who lives in 'BINH CHANH' or 'TAN BINH' 5. Find all Products having 10<= Price <= 45 6. Find all customers who have a phone number. 7. Find months and years in which customer 'C01' made at least an order. 8. Find all customers whose name begin with 'TRAN '. 9. Find all LCD monitor products. 10. Find the CustomerlID of all customer who made orders in May 2000. 11. List all Products by descending order of Price. 12. List all customer by descending order of Address, with customers having same address we order by ascending order of Name. 13. Find the product with the highest Price.
Expert Answer:
Answer rating: 100% (QA)
1 Select from Products 2 Select Name Phone from Customers where A... View the full answer
Posted Date:
Students also viewed these databases questions
-
Write an SQL command that will find any customers who have not placed orders.
-
Show the customer ID and name for all the customers who have ordered both products with IDs 3 and 4 on the same order.
-
Write the SQL queries that accomplish the following tasks in the HAFH Realty Company Property Management Database: a. Display the SMemberID and SMemberName for all staff members. b. Display the CCID,...
-
Some observers maintain that not all politicians move toward the middle of the political spectrum in order to obtain votes. They often cite Barry Goldwater in the 1964 presidential election and...
-
Identify the parties to crime under the Model Penal Code and under common law.
-
Use the Gauss-Seidel method to solve the following system until the percent relative error falls below S = 5%, 10x1 + 2x2 x3 = 27 3x1 6x2 + 2x3 = 61.5 x1 + x2 + 5x3 = 21.5
-
Describe the similarities and dissimilarities among the following types of creditors: secured creditors, unsecured creditors, and preferred creditors.
-
In the early twentieth century, there was an ambitious young man named Arthur who started working at a company in Chicago as a mailroom clerk. He was a hard worker and very smart, eventually ending...
-
1.XYZ Corp. just paid an annual dividend of $3 per share on its common stock. This dividend is expected to grow at a 10 percent annual rate for two years, after which it is expected to grow at a 6...
-
Comparative Statements of Retained Earnings for Renn-Dever Corporation were reported as follows for the fiscal years ending December 31, 2019, 2020, and 2021. Balance at beginning of year Net Incone...
-
Amanpreet's Car Detailing Company had been working and growing for years. Business was staple. They were looking to partner with an auto body shop because they wanted to inject some vigor and new...
-
A certain item has a linear supply curve \[p=0.0005 n-3\] and a linear demand \[p=8-0.0006 n\] where \(p\) is the price and \(n\) is the number of items. What is the equilibrium point \((p, n)\) ?
-
The supply for a certain commodity is linear and determined to be \[p=0.005 n+12\] whereas the demand is linear with \[p=150-0.01 n\] where \(p\) is the price and \(n\) is the number of items. What...
-
An after-shave lotion is \(50 \%\) alcohol. If you have 6 fluid ounces of the lotion, how much water must be added to reduce the mixture to \(20 \%\) alcohol?
-
Suppose your college transcripts show the following distribution of grades: A: 2 B: 6 C: 5 D: 1 F: 0 If all of these grades are in three-unit classes, use this information to answer the questions in...
-
A fair apportionment of dividing a leftover piece of cake between two children is to let child \#1 cut the cake into two pieces and then to let child \#2 pick which piece he or she wants. Consider...
-
What are the estimates when calculating depreciation? Which estimates may be revised? What happens when you make a change in estimate? How the change affects future calculations? Provide a simple...
-
Using the theoretical sampling strategy, how many samples of size 4 (n = 4) can be drawn from a population of size: (a) N = 5? (b) N = 8? (c) N = 16? (d) N = 50?
-
First-Year College GPA Researchers at the College Board wanted to build a model that describes one's first-year college GPA. The researchers obtained the following model: \[\hat{y}=0.06 x_{1}+0.07...
-
Suppose we record the gender of the 15 students enrolled in an introductory statistics course as they enter the classroom. The males are denoted by a blue M and the females are denoted by a red...
-
A nutritionist wants to develop a model that describes the relation between the calories, total fat content, protein, sugar, and carbohydrates in cheeseburgers at fast-food restaurants. She obtains...
Study smarter with the SolutionInn App