Database System Concepts
7th Edition
ISBN: 9780078022159
Author: Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher: McGraw-Hill Education
expand_more
expand_more
format_list_bulleted
Question
From the following query, identify the value of City:
INSERT INTO Customers ( CustomerName, ContactName, Address, City, PostalCode, Country)
VALUES (‘Cardinal,”Tom B. Erichsen”,”Skagen 21”, “Stavanger,” “4006Norway’);
Expert Solution
This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
Step by stepSolved in 2 steps with 1 images
Knowledge Booster
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.Similar questions
- Write a query to display the employee number, last name, first name, salary “from” date, salary end date, and salary amount for employees 99675, 53845, and 44035. Sort the output by employee number and salary “from” date.arrow_forwardUsing the EMPLOYEE table that already exists, use a subquery to insert the remaining rows from the EMPLOYEE table into the EMP_1 table. Remember, your subquery should only retrieve the columns needed for the EMP_1 table and only the employees shown in the figure.arrow_forwardFrom invoices table, write a query to retrieve everything (all columns), plus, add an additional column that retrieves difference in the number of days between the invoice due date and paymentdate, and name the column “Difference”. Note that the difference in days should be calculated bysubtracting “payment_date” from “invoice_due_date”.Hint1, refer to the following sample:... Invoice Due Date Payment Date Difference... 2018-05-08 2018-05-07 1... 2018-05-10 2018-05-14 -4... 2018-05-13 2018-05-09 4Hint 2: simple subtraction or DATEDIFF function. Both works.arrow_forward
- Write the following as MySQL query: Find the employee ID, first and last name, and salary for each employee whose salary ismore than $20,000 or who works in the shipping department. Use the UNION set operator. List the country ID, country name, city, and state/province. Be sure all country names areincluded in the result, regardless of whether there is no matching city and state/province. You have to use an outer join.arrow_forwardusing the code below write a query to display the minimum balance, maximum balance, and average balance for memberships that have a rental CREATE TABLE MEMBERSHIP ( MEM_NUM NUMBER(8,0) PRIMARY KEY, MEM_FNAME VARCHAR2(30) NOT NULL, MEM_LNAME VARCHAR2(30) NOT NULL, MEM_STREET VARCHAR2(120), MEM_CITY VARCHAR2(50), MEM_STATE CHAR(2), MEM_ZIP CHAR(5), MEM_BALANCE NUMBER(10,2) ); CREATE TABLE RENTAL ( RENT_NUM NUMBER(8,0) PRIMARY KEY, RENT_DATE DATE DEFAULT SYSDATE, MEM_NUM NUMBER(8,0) CONSTRAINT RENTAL_MEM_NUM_FK REFERENCES MEMBERSHIP ); INSERT INTO MEMBERSHIP VALUES (102, 'TAMI', 'DAWSON', '2632 TAKLI CIRCLE', 'NORENE', 'TN', '37136', 11); INSERT INTO MEMBERSHIP VALUES (103, 'CURT', 'KNIGHT', '4025 CORNELL COURT', 'FLATGAP', 'KY', '41219', 6); INSERT INTO MEMBERSHIP VALUES (104, 'JAMAL', 'MELENDEZ', '788 EAST 145TH AVENUE', 'QUEBECK', 'TN', '38579', 0); INSERT INTO MEMBERSHIP VALUES (105, 'IVA',…arrow_forwardCreate a query that lists the department number, employee number, and salaries of all employees in department D11. UNION the same information , but this time sum up all the salaries to create a one line summary entry for the D11 department (hint sum the salary). Sort the list by Salary.arrow_forward
- Select all rows from the Orders table where the CustomerID is greater than 300.arrow_forwardRun a query or multiple queries if needed to report on final exam average based on thestudent’s age. Give an average for all students 40 and below and an average for all studentsover 40. This report will be used continuously so you cannot just figure out what 40 years agotoday was. You need to use the date to calculate their age somewhere in your solutionarrow_forward
arrow_back_ios
arrow_forward_ios
Recommended textbooks for you
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education
Database System Concepts
Computer Science
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:McGraw-Hill Education
Starting Out with Python (4th Edition)
Computer Science
ISBN:9780134444321
Author:Tony Gaddis
Publisher:PEARSON
Digital Fundamentals (11th Edition)
Computer Science
ISBN:9780132737968
Author:Thomas L. Floyd
Publisher:PEARSON
C How to Program (8th Edition)
Computer Science
ISBN:9780133976892
Author:Paul J. Deitel, Harvey Deitel
Publisher:PEARSON
Database Systems: Design, Implementation, & Manag...
Computer Science
ISBN:9781337627900
Author:Carlos Coronel, Steven Morris
Publisher:Cengage Learning
Programmable Logic Controllers
Computer Science
ISBN:9780073373843
Author:Frank D. Petruzella
Publisher:McGraw-Hill Education