Oracle 12c: SQL
3rd Edition
ISBN: 9781305251038
Author: Joan Casteel
Publisher: Cengage Learning
expand_more
expand_more
format_list_bulleted
Question
error_outline
This textbook solution is under construction.
Students have asked these similar questions
According to your student number and the following formula, please answer the corresponding questions in one single file.
if(yourStudentNumer % 3==0)
select questions with X[0] lable
if(yourStudentNumer % 3==1)
select questions with X[1] lable
if(yourStudentNumer % 3==2)
select questions with X[2] lable
SELECT COUNT(INV_NUMBER) AS 'Total Invoices', SUM(TOTAL_PRICE) AS 'Total Sales', MIN(TOTAL_PRICE) AS 'Minimum Customer Purchases', MAX(TOTAL_PRICE) AS 'Largest Customer Purchases', ROUND(AVG(TOTAL_PRICE), 2) AS 'Average Customer Purchases'FROM (SELECT CUS_CODE, LINE.INV_NUMBER AS INV_NUMBER, ROUND(SUM(LINE.LINE_PRICE * LINE.LINE_UNITS), 2) AS TOTAL_PRICEFROM INVOICE, LINE WHERE INVOICE.INV_NUMBER = LINE.INV_NUMBER GROUP BY CUS_CODE, LINE.INV_NUMBERORDER BY CUS_CODE, LINE.INV_NUMBER)INVOICELINE;
i use this code but it didn't show the same value as in the question
The pAT_Name call him, Stores patients names. Which of the following returns true for patients named 'VILLANUEVA,JANE'
select one of the following:
A. PAT_NAME <> 'SMITH,SAM'
B. PAT_NAME ='SMITH,SAM'
C. PAT_NAME LIKE 'SMITH,SAM'
D. PAT_NAME LIKE 'JANE'
Knowledge Booster
Similar questions
- Which of the following SELECT statements displays a list of customer names from the CUSTOMERS table? SELECT customer names FROM customers; SELECT “Names” FROM customers; SELECT firstname, lastname FROM customers; SELECT firstname, lastname, FROM customers; SELECT firstname, lastname, “Customer Names” FROM customers;arrow_forwardWhich of the following SQL statements is invalid and returns an error message? ALTER TABLE books ADD CONSTRAINT books_pubid_uk UNIQUE (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_pk PRIMARY KEY (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_nn NOT NULL (pubid); ALTER TABLE books ADD CONSTRAINT books_pubid_fk FOREIGN KEY (pubid) REFERENCES publisher (pubid); All of the above statements are invalid.arrow_forwardThe tblCities table contains a numeric field named Population. Which of the following LINQ statements calculates the total population of all the cities in the table?a. Dim intTotal As Integer = Aggregate city In CitiesDataSet.tblCities Select city.Population Into Sum()b. Dim intTotal As Integer = Sum city In CitiesDataSet.tblCities Select city.Population Into totalc. Dim intTotal As Integer = Aggregate CitiesDataSet.tblCities.city Select city.Population Into Sum()d. Dim intTotal As Integer = Sum city In CitiesDataSet.tblCities.populationarrow_forward
- The tblCities table contains a numeric field named Population. Which of the following LINQ statements selects all cities having a population that exceeds 15000?a. Dim records = From city In CitiesDataSet.tblCities Where Population > 15000 Select cityb. Dim records = From city In CitiesDataSet.tblCities Select city.Population > 15000c. Dim records = From city In CitiesDataSet.tblCities Where city.Population > 15000 Select city d. Dim records = Select city.Population > 15000 From tblCitiesarrow_forwardThe APPT_DTTM column stores the date and time of an appointment. Which of the following expressions would return TRUE for all appointments on January 1, 2018, and FALSE for all other appointments? SELECT ONE OF THE FOLLOWING A. APPT_DTTM >= '1 JAN 2018' AND APPT_DTTM < '2 JAN 2018' B. APPT_DTTM = '1 JAN 2018' C. APPT_DTTM > '31 DEC 2017' AND APPT_DTTM <= '1 JAN 2018' D. APPT_DTTM > '31 DEC 2017' AND APPT_DTTM < '2 JAN 2018' Choose one correct answer and what is output of remaining queries with proper explanationarrow_forwardThis does not work: CREATE OR REPLACE TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAFT SET AC_TTAF = AC_TTAF + NEW.CHAR_HOURS_FLOWN, AC_TTEL = AC_TTEL + NEW.CHAR_HOURS_FLOWN, AC_TTER = AC_TTER + NEW.CHAR_HOURS_FLOWN WHERE AIRCRAFT.AC_NUMBER = NEW.AC_NUMBER; END; I get the following error: ERROR 1064 (42000) at line 1: You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right syntax to use near 'TRIGGER trg_char_hours AFTER INSERT ON CHARTER FOR EACH ROW BEGIN UPDATE AIRCRAF' at line 1 Here is the original question: Create a trigger named trg_char_hours that automatically updates the AIRCRAFT table when a new CHARTER row is added. Use the CHARTER table’s CHAR_HOURS_FLOWN to update the AIRCRAFT table’s AC_TTAF, AC_TTEL, and AC_TTER values. (Hint: use temp values, as the INSERT event does not accept the OLD keyword.)arrow_forward
- SELECT MAX(datediff(minute,start_time,end_time)) as "Longest_ride", MIN(datediff(minute,start_time,end_time)) as "shortest_ride" from RIDE LIMIT 0, 1000 Error Code: 1582. Incorrect parameter count in the call to native function 'datediff' 0.00034 sec How do I solve this SQL errorarrow_forward53. Which SELECT statement retrieves the customer name for those that have a salesperson number of 137? A: SELECT CUSTNAME FROM CUSTOMER WHERE SPNUM 137; B: SELECT* FROM CUSTNAME WHERE SPNUM=137; C: SELECT CUSTOMER FROM CUSTNAME WHERE SPNUM=137; D:SELECT* FROM CUSTOMER WHERE SPNUM=137arrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Np Ms Office 365/Excel 2016 I NtermedComputer ScienceISBN:9781337508841Author:CareyPublisher:CengageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781285196145Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos CoronelPublisher:Cengage Learning
- Database Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781305627482Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningA Guide to SQLComputer ScienceISBN:9781111527273Author:Philip J. PrattPublisher:Course Technology Ptr
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:9781337508841
Author:Carey
Publisher:Cengage
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781285196145
Author:Steven, Steven Morris, Carlos Coronel, Carlos, Coronel, Carlos; Morris, Carlos Coronel and Steven Morris, Carlos Coronel; Steven Morris, Steven Morris; Carlos Coronel
Publisher:Cengage Learning
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781305627482
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
A Guide to SQL
Computer Science
ISBN:9781111527273
Author:Philip J. Pratt
Publisher:Course Technology Ptr