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

Programming with Microsoft Visual Basic 2017
8th Edition
ISBN:9781337102124
Author:Diane Zak
Publisher:Diane Zak
Chapter12: Database Queries With Sql
Section: Chapter Questions
Problem 1E
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
Programming with Microsoft Visual Basic 2017
Programming with Microsoft Visual Basic 2017
Computer Science
ISBN:
9781337102124
Author:
Diane Zak
Publisher:
Cengage Learning
Oracle 12c: SQL
Oracle 12c: SQL
Computer Science
ISBN:
9781305251038
Author:
Joan Casteel
Publisher:
Cengage Learning
Np Ms Office 365/Excel 2016 I Ntermed
Np Ms Office 365/Excel 2016 I Ntermed
Computer Science
ISBN:
9781337508841
Author:
Carey
Publisher:
Cengage
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
COMPREHENSIVE MICROSOFT OFFICE 365 EXCE
Computer Science
ISBN:
9780357392676
Author:
FREUND, Steven
Publisher:
CENGAGE L
Database Systems: Design, Implementation, & Manag…
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…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781305627482
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning