Consider the employee
underlined. Give an expression in SQL for each of the following queries.
a. Find the names and cities of residence of all employees who work
for First Bank Corporation.
b. Find the names, street addresses, and cities of residence of all employees
who work for First Bank Corporation and earn more than
$10,000.
c. Find all employees in the database who do not work for First Bank
Corporation.
d. Find all employees in the database who earn more than each employee
of Small Bank Corporation.
e. Assume that the companies may be located in several cities. Find all
companies located in every city in which Small Bank Corporation is
located.
f. Find the company that has the most employees.
g. Find those companies whose employees earn a higher salary, on
average, than the average salary at First Bank Corporation.
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps
- please use SQL to answer the following question an erd had been provide as wellarrow_forwardAll parts of this question use the following database schema: Flights(flno, from, to, distance) Aircraft(aid, aname, cruisingrange) Certified(eid, aid) Employees(eid, ename, salary) c) For each cruisingrange held by at least 3 aircraft, give the lowest salary of employees certified to fly one of those aircraft. Express in SQL only:arrow_forwardAssume the e-commercial database shown in the Appendix. Write the following queries in (a) relational algebra and (b) SQL. State your assumptions if the semantics is not clear. 1) Find the names of all students who have not taken any courses. APPENDIX STUDENTS(student id, first_name, last _name, email, major_code, class_year) COURSES(course id, course_name, course_description, credits, department_code) ENROLLMENTS(student id, course id, semester, grade) MAJORS(major code, major_name, department_code) DEPARTMENTS(department code, department_name)arrow_forward
- Using the Henry Books database,Henry Books no longer carries books written by Barbara Owen. Delete this author from the authors table. You will insert 2 snips for this question. What construct did you use to delete author Barbara Owens? Insert the snip of the construct used: Insert the snip of the authors table. Be sure all rows are displayed:arrow_forwardGiven the table PRODUCT(ProductID, ProductName, ProductClass, ProductWeight, ProductStyle, ProductColor, ProductPrice). Note: ProductWeight and ProductPrice are numeric fields, and the other attributes are character fields, i.e., store text. Write a SQL query to retrieve all details of products whose name is "Watermelon" and whose color is "green".arrow_forwardUse SQL to query the inter assignee patent citations among top 100 assigneesarrow_forward
- Use the Pine Valley Furniture (PVF) database for this question. Write a SQL query to display the customer ID and total number of orders placed for those customers who placed more than one order.arrow_forwarduse sql to answer the following question To perform below tasks, refer to tables in the JustLee Book database. Create a list that display the title of each book and the name and phone number of the contact at the publisher’s office for reordering each book. Which books were written by an author with the Last Name-First Name (BAKER JACK)? Perform the search using author’s last name/first name. Determine which book(s) purchased by customer Steve Schell. Perform the search using the customer name & last name, not the customer number. If he/she has purchased multiple copies of the same book, unduplicated(DISCTINC) the result.arrow_forwardUsing the instance of the Airport database, formulate the following queries in the relationalalgebra: 1)List the name and the state of all United States airports. 2)List full details of all airports located outside the United States.Note: You should use the not equal sign in this query. 3)Display the number of all carriers and the average of their revenues. 4)Display the minimum, the average, and the maximum distances of the flights that arescheduled on October 17th, 2017? Example: List all airport names. π name Airport More example provided it attached file.arrow_forward
- Use SQL and TAL Distributors database to complete the following questions:List the customer number and name for all customers located in the city of Grove. Your query should ignore case. For example, a customer with the city Grove should be included as should customers whose city is GROVE, grove, GrOvE, and so on.arrow_forwardUse SQL and run on Oracle: 1.Use exists operator and find all clients that have not viewed property for rent number ‘PA14’. 2.Insert these three records into the staff table: (‘SG15’, ‘Yusuf’, ‘Kareem’, ‘Assistant’, ‘M’, ‘1970-06-20’, 9300, ‘B003’) (‘SG16’, ‘Aishah’, ‘Ahmad’, ‘Manager’, null, null, null, ‘B003’) (‘SG17’, ‘Ibrahim’, ‘Zeki’, ‘B003’) Use SQL and run on Oracle: Increase the rent for all flats in Glasgow by 15%. Tina Murphy had just sold all her properties to Carol Farrel. Update the correct records to reflect the transfer of ownership from Tina to Carol. Delete the branch office in ‘163 Main St’ from the Database record.arrow_forwarduse sql to answer the following question an erd has been provide List all criminals along with crime status and appeal status (if applicable). The reports need to include the criminal ID, name, crime classification, date charged, appeal filing date, and appeal status. Show all criminals, regardless of whether they have filed an appeal. Hint: Join between tables criminals, crimes , appeals Inner join between criminals and crimes but LEFT JOIN with appealsarrow_forward
- 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