
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
Concept explainers
Question
i.Write an SQL query to fetch “FIRST_NAME” from Worker table using the alias name as <WORKER_NAME>. ii.Write an SQL query to fetch unique values of DEPARTMENT from Worker table.
Expert Solution

This question has been solved!
Explore an expertly crafted, step-by-step solution for a thorough understanding of key concepts.
This is a popular solution
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps

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 SQL query. List names of all employees who have sold to customer Rachel Patterson (Note: You can only use the information given in the question, i.e. you cannot first look up Rachel Patterson’s Customer ID and use that ID in your query).arrow_forwardIn the preceding PL/SQL block, determine the values and data types for each of the following cases. a. The value of v_customer in the nested block is: b. The value of v_name in the nested block is: c. The value of v_credit_rating in the nested block is: d. The value of v_customer in the main block is: e. The value of v_name in the main block is: f. The value of v_credit_rating in the main block is: de Academyarrow_forwardEMP_STAFF = "Y" "AS" STAFF PK,FK1 EMP ID ITSTAFF PK,FK1 EMP_ID STAFF_LEVEL STAFF TYPE "IT" ACADSUPPORT PK,FK1 EMP_ID Current Data Historic Data IT_STAFF_GROUP STAFF_TYPE EMPLOYEE PK EMP_ID IT_STAFF_GROUP EMP_LNAME EMP FNAME EMP INITIAL EMP_HIREDATE EMP STAFF EMP ADMIN EMP PROF EMP_PROF="Y" TECHSUPPORT PK,FK1 EMP_ID PROFESSOR PK EMP ID PK,FK1 EMP ID H+ EMP_ADMIN "Y" EMP_JOB_HIST ADMIN PK,FK1 EMP_ID PROF SPECIALTY PROF_RANK "TS" EMPLOYEE EMP_LNAME EMP_FNAME has EMP INITIAL EMP_HIREDATE EMP STAFF EMP_ADMIN EMP PROF OPK ADMIN_POSITION OPK,FK1 PK,FK2 PK Where Employee and Professor table part is extended as shown below Hois dean of HO JOB_HIST PK,FK1 EMP ID PK,FK2 SCHOOL CODE JH_DATE ASSIGN TAKEN JH_DATE_ENDED JH EMP_SALARY EMP_PROF "Y" EMP ID TRN_ID TAKEN DATE PK,FK1 EMP ID TAKEN_TYPE TAKEN_PASS PK PROFESSOR SCHOOL SCHOOL_CODE SCHOOL_NAME FK1 EMP ID PROF_SPECIALTY PROF_RANK SCHOOL JOB_HIST has TRAINING HPK TRN_ID TRN_CATEGORYarrow_forward
- 1. Write an SQL query to find all customers whose name (either last name or first name) contains “brown”. (Make sure the search is case insensitive.) 2. Write the SQL query to update all products’ discount per cents to 25% whose prices are more than $2000. Also, update the dateAdded field with the current datearrow_forwardWrite and execute a SQL query to list all patient numbers and encounter ids which do not have any data (missing rows) in VisitSummary table. Order the result by patient number, encounter id. Write and execute a SQL query to list all patients whose information about race or gender has changed during their future visits. A future visit is defined as T1.encounter_id < T2.encounter_id. Your output should have patient number, old and new race values, old and new gender values, and the encounter ids. Write and execute a SQL query to list all the patient data for all encounters. Even if patient data is missing in other tables, you still need to list the patient_nbr and encounter_id in your output. Your output should list all the columns (without repeating them) starting with encounter_id, patient_nbr... and it should be ordered by patient_nbr and then encounter_id. Write and execute a SQL query to list all the patient data for all encounters. If the patient data is missing…arrow_forwardHow can the CAST function be combined with other functions to enhance data type compatibility in SQL queries?arrow_forward
- Create a function to increment the salary of employees of an organization by 15%, and for employees with department ID 100 give another 10% hike on the updated salary. Also, write the query to update the salary of all records of the salary column in the employee table using the created function. In PL/SQLarrow_forwardWrite an SQL query that will show all data from the Customers table andOrder By State.arrow_forwardWrite an SQL query using the NOT operator that will show all employeeinformation from the Employee table with the exception of EmployeeNumber 7344.arrow_forward
- Problem 9 Write a query to count the number of invoices.arrow_forward4) Display the firstname, lastname of the employees and the customerID that the employee served. Arrange the results by the last name. 5) Write a query to the Name of the Product and the corresponding name of the supplier of that Product for all the products that start with a “P”. 6) Write a SQL query to output the product name and the quantity of the Orders of that product for those orders with more than 70 quantity. (hint: don’t have to use GROUP BY) I need help figuring out the SQL quereys for the questions above using table joining methodarrow_forwardWrite a query in SQL code for: "List the book categories and the average book price of each category." Tablename is "BOOKS" and column names are: ISBN TITLE PUBDATE PUBID COST RETAIL DISCOUNT CATEGORYarrow_forward
arrow_back_ios
SEE MORE QUESTIONS
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