This is a database question that needs to be coded in SQL. 1. How many orders ar
ID: 3859488 • Letter: T
Question
This is a database question that needs to be coded in SQL.
1. How many orders are created by 'customer 1279'?
2. Find the minimum 'total price' of the orders which are placed by customer 1234.
SELECZ RON orders ORDER BY O TOTALPRICE DESC Profiling [ Edit inline ] [ Edit ][ Explain SQL ][ Create PHP Code][ Refresh >> 1 Number of rows: 25 # Filter rows: Search this table ort by key: None Options O ORDERKEY O CUSTKEY O ORDERSTATUS O CLERK O SHIP-O COMMENT PRIORITY O TOTALPRICE O ORDERDATE O ORDER- 0 / Edit ji Copy Delete Edit Copy Delete 0 / Edit Copy Delete Edit Copy Delete / Edit , Copy Delete Edit Copy Delete dp Edit i Copy Delete Edit CopyDelete O Edit Copy Delete Edit Copy Delete 0 / Edit Copy Delete Edit i Copy Delete Copy Delete 676 O 667 O 1013 O 953 O 178 O 676 O 1016 O 358 F 1279 F 334 F 1003 O 154 O 9/22/1996 10/21/1995 814/1997 10/24/1996 49/1997 6/20/1995 2/161998 3/161992 105/1994 PRIORITY 3-MEDIUM 2-HIGH 1-URGENT 4-NOT SPEC 1-URGENT 1-URGENT 2-HIGH 4-NOT SPEC 2-HIGH 5-LOW 3-MEDIUM 5-LOW 4-NOT SPEC 52965 466001.28 0 furiously slow dependencies 0 packages are slyly ironic, even accounts. 0 regular, even requests at the carefull 0 slyly special deposits use. blithely even 0 furiously final pack 0 express, unusual excuses hirnder bli 0 platelets cajole carefully accounts. slyly final 0 blithely express accounts boost blithely. 29158 439687.23 44707 431771.98 59106 430619.75 6882 57376 39456 422359.65 411255.486 409770.83 17571 408345.74 inal, 0 ironic deposits wake blithely final, ironic 0 fluffily ironic accounts under the furiously 0 carefully even deposits cajo 0 slyly final accounts haggle furiously! blithely 0 carefully regular accounts after the quickhy 39620 35460 405742.27 11/28/1993 Clerk#000000 1 1 2 15779 45382 52480 2/24/1998 1/21/1996 7/28/1993 405401.76 405235.90 583 FExplanation / Answer
1.How many orders are created by 'customer 1279'?
SELECT COUNT(O_ORDERSTATUS)
FROM Orders
WHERE 'O_CUSTKEY=1279';
(since orderquantity is not given column name is taken as order status)
2.Find the minimum 'total price' of the orders which are placed by customer 1234.
SELECT MIN(O_TOTALPRICE)
FROM Orders
WHERE 'O_CUSTKEY=1234';
3.How many orders have 'total price' between 10,000 and 90,000 dollars.
SELECT COUNT(O_TOTALPRICE)
FROM Orders
WHERE O_TOTALPRICE BETWEEN 10000 AND 90000;
Related Questions
drjack9650@gmail.com
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.