Related questions
Write SQL statement that retrieve the department_name that has the maximum number of employees:
select d_name
from depart
where depart_id=(
select depart_id
from emp
having count(*)=
(select max(count(*))
from emp
group by depart_id)
group by depart_id);
select depart_name
from depart
where depart_id=(
select depart_id
from emp
where count(*)=
(select max(count(*))
from emp
group by depart_id)
group by depart_id);
select depart_name
from depart
where depart_id=(
select depart_id
from emp
having count(*)=
(select max(count(*))
from empl
group by depart_id));
select depart_name
from depart
where depart_id=(
select depart_id
from emp
having count(*)=
(select max(count(*))
from emp
group by depart_id)
group by depart_id);
Trending nowThis is a popular solution!
Step by stepSolved in 4 steps with 3 images
- Write the suitable SQL statement to answer the following questions based on the following tables ( image )the question is:3. Change EMPLOYEE (EMP_ID= 505) SALARY to 70000.arrow_forwardTrying to write SQL statements for these shown here and having issues with them working. Explanation on this would be appreciated.arrow_forwardInstructions: Write the suitable SQL statement to answer the following questions based on the following tables ( image )the question is:2. Get employee details from employee table whose first name starts with 'J', order the result descending.arrow_forward
- write SQL statement to search for employees who is the manager of the department specified by the cboDeptarrow_forwardPlease refer to the following diagram for Q19 to Q20. PERSON PK P_ID P_LNAME P_FNAME ΕMPLOYΕ P_ID EMP_HIRE_DATE STUDENT P ID STUDY ΜAIOR PK, FK1 PK, FK1 19. Which of the following statements is/are true? (1) A Person must be either a Student or an Employee. (2) A Person can neither be a Student nor an Employee. (3) A Person must be a Student or an Employee or both. a. (1) only b. (3) only c. (1) and (2) only d. (1), (2) and (3).arrow_forwardwrite SQL statement to search for employees whose manager is specified by the txtEname boxarrow_forward
- Based on SQL informationarrow_forwardFor below DEPARTMENT table write a SQL query so that repeated group names are shown with quotation symbol like in above desired output For understanding logic, can you give simple example in Microsoft SQL Server Management Studio 18. Thank you.arrow_forwardThe following two SQL statements will produce the same results. SELECT P_DESCRIPT, P_QOH,P_PRICE FROM PRODUCT WHERE P_QOH >(SELECT P_QOH FROM PRODUCT WHERE P_CODE='11QER/31') AND P_PRICE>(SELECT P_PRICE FROM PRODUCT WHERE P_CODE='11QER/31'); SELECT P_DESCRIPT, P_QOH,P_PRICE FROM PRODUCT WHERE (P_QOH,P_PRICE) > (SELECT P_QOH,P_PRICE FROM PRODUCT WHERE P_CODE='11QER/31'); A) True B) Falsearrow_forward
- Based on SQL query knowledgearrow_forwardWrite a SQL code that returns the name of aircraft (MOD_NAME in MODEL table), number of trips each mode flied (based on the CHARTER table, name this Trip_Num), and Total distance of each mode (based on the CHARTER table, name this Total_Distance).arrow_forwardI need help with the SQL query for the following question: 1. What is the total number of reviews in every zip code. Here is the information on the field names: The table name is: Reviews Review Form Fields Product/ModelName: Product/Category: Product/Price: Retailer/Name: Retailer/ZipCode: Retailer/City: Retailer/State: Product/On Sale: Manufacturer/Name: Manufacturer/Rebate: Review/UserId: Review/Rating: Review/Date: Review/Text: Example of Review Form Filled out ProductModelName: Galaxy S4 ProductCategory: Smart Phone ProductPrice: 499 RetailerName: Bestbuy RetailerZipCode: 44114 RetailerCity: Cleveland RetailerState: OH ProductOnSale: No ManufacturerName: Samsung ManufacturerRebate: No ReviewUserId: xmm473 ReviewRating: 3 ReviewDate: 6/10/2012 ReviewText: overheats after 2 hoursarrow_forward
- Text book imageDatabase System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationText book imageStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONText book imageDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- Text book imageC How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONText book imageDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningText book imageProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education