
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
Objectives:
To understand and be able to write simple SQL queries
Instruction:
Refer to HR schema to answer the questions
Include screenshot of your code and output of each question
1. Write SQL query that displays the last name and salary of employees earning more than $12,000.
2. Write SQL query that displays the last name and department number for employee number 176.
3. Write SQL query to display the last name and salary for all employees whose salary is not in the range $5,000 through $12,000.
4. Write SQL query to display the last name, job ID, and hire date for employees with the last names of Matos and Taylor. Order the query in ascending order by hire date.
5. Display the last name and department ID of all employees in departments 20 or 50 in ascending alphabetical order by name.
6. Write a query that displays the last names of all employees who have both an “a” and an “e” in their last name.
7. Write a query to display the employee number, last name, salary, and salary increased by 11.5% (expressed as a whole number) for each employee. Label the column New Salary.
8. Write a query that displays the last name (with the first letter in uppercase and all the other letters in lowercase) and the length of the last name for all employees whose name starts with the letters “A,” “J,” or “M.” Give each column an appropriate label.
9. Write a query that displays the list of job_id, their average salary is greater than 6500
10. Write a query that displays the number of regions in each country
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
- Database Oracle sql Note :I hope the solution is from HR in the Oracle sql softwarearrow_forwardSQL DML/DDL There are five tables describing employees of a company, departments, buildings, which department(s) an employee works in (and a percentage of the time for each), and in which building an employee works (an employee may have more than one office). The primary key of each table is the attribute(s) in capitals and underlined. The foreign keys are in italics. Other attributes are not necessarily unique.Employee (EID, Ename, Salary, Start_Date, End_Date)Building (BID, Bname, Address)Department (DID, Dname, Annual_Budget)In_Department (EID, DID, Percentage_Time)In_Building (EID, BID)Write the SQL statements for the following.1. Find the names of Departments where NO employees work. 2. For employees who are still working in the company, end date has no value (empty). For those who have left the company and have end date values, show their names and the duration of their employment in years. 3. Find the names of buildings where more than 50 employees work. 4. The tables have…arrow_forwardLooking Up Data- INDEX () & MATCH() Which of the following statements describes how the INDEX) and MATCH() functions are combined to lookup data? A) MATCH() is used within the INDEX() function to return the relative position of the data in the lookup table B) INDEX) is used within the MATCH() function to return the relative position of the data in the lookup table C) MATCH() is used to match values from the lookup table and the source table, INDEX() returns the index of these values D) INDEX calculates the relative position of the data in the source table and returns values for MATCH() to lookuparrow_forward
- Row trigger that gives the sum total before insert or update using sqlarrow_forwardDatabase sql 1-Write the syntax to create an object table called people using people_typearrow_forward31 Refer to the given SQL statement. SELECT PRODNUM, PRODNAME FROM PRODUCT: Which line designates a product number of at least 300 when added to the end of this statement? O WHERE PRODNUM>=300 WHERE PRODNUM=300+ O WHERE PRODNUM=(300; unlimited) WHERE PRODNUM=>300arrow_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