Answered step by step
Verified Expert Solution
Link Copied!

Question

1 Approved Answer

Worksheet Query Builder select * from staff Worksheet Query Builder select * from place 1 1 2 3 Script Output Query Result SQL | All

image text in transcribed

image text in transcribed

Worksheet Query Builder select * from staff Worksheet Query Builder select * from place 1 1 2 3 Script Output Query Result SQL | All Rows Fetched: 11 in 0.003 seconds STAFFID FNAME 1 LNAME SALARY 95 Are Abdulla 2400 2 96 ASO ALI 2100 3 97 SARA SAMAN 2100 98 Karwan Osman 2100 5 99 SAZ Bwar 2900 6 100 Steven King 24000 7 101 Neena Kochhar 17000 8 102 Lex De Haan 17000 103 Alexander Hunold 9000 104 Bruce Ernst 6000 11 105 David Austin 4800 Script Output * Query Result * SQL All Rows Fetched: 10 in 0.003 seconds PLACEID CITY COUNTRY_ID 900 Malaysia MY 800 IRAQ 1000 Roma IT 1100 Venice IT 1200 Tokyo JP 1300 Hiroshima JP 1400 Southlake US 1500 South San Francisco US 1600 South Brunswick US 10 1700 Seattle US MANAGER_ID BRANCHID (null) (null) (null) 30 104 30 105 (null) 105 100 (null) 90 100 90 100 90 102 60 103 60 103 60 4 5 6 7 9 10 9 Worksheet Query Builder select * from branch Figure 3: Tables contents 1 Script Output Query Result * SQL All Rows Fetched: 6 in 0.128 seconds BRANCHID BRANCHNAME MANAGER_ID PLACEID 10 Administration 200 1700 30 Purchasing 114 1700 50 shipping 121 1500 60 IT 103 1400 90 Executive 100 1700 100 Finance 108 1700 2 3 4 5 6 Write SQL code to display the staff number, last name, salary, branch number, and the average salary in their branch for all staffs. . Write SQL code to list all staff id, first name, last name, branch id and branch name. . Write SQL code to list all staff id, first name, last name, branch name and branch place id. . Write SQL code to list all staff id, first name, last name, branch name and city. . Write SQL code to list all branch with all its staffs, including all branch without staff. Write SQL code to list all staffs with their branches, including all staffs without branch. . How can we get the records for all staffs AND all branches whether they are missing information or not? . Write SQL code to list branch IDs for branches that do not contain the manager IDs 10 and 50. Use the MINUS set operator to create this query. The HR branch needs a report with the following specifications: First name, last name and branch ID of all the staffs from the STAFF table, regardless of whether or not they belong to a branch branch ID and branch name of all the branches from the BRANCH table, regardless of whether or not they have staffs working in them Write a compound query to accomplish this using the UNION set operator to create this query

Step by Step Solution

There are 3 Steps involved in it

Step: 1

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

Database Concepts

Authors: David M. Kroenke

1st Edition

0130086509, 978-0130086501

More Books

Students also viewed these Databases questions