Database design 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 las

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

Database design

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
trending now

Trending now

This is a popular solution!

steps

Step by step

Solved in 2 steps

Blurred answer
Knowledge Booster
Table
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
Recommended textbooks for you
Database System Concepts
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)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education