Consider the following relations: emp(empno, ename, age, job, salary, dob, doj, deptno) Find employees who earns...
Fantastic news! We've Found the answer you've been seeking!
Question:
Transcribed Image Text:
Consider the following relations: emp(empno, ename, age, job, salary, dob, doj, deptno) Find employees who earns highest salary for their job (A) select ename, job, salary from emp where sal in (select max(sal) from emp group by job); (B) select ename, job, salary from emp where (job, sal) in(select job, max(sal) from emp group by job); (C) select ename, job, salary from emp where (job, sal) = (select job, max(sal) from emp group by job); (D) Both B and C Consider the following relations: emp(empno, ename, age, job, salary, dob, doj, deptno) Find employees who earns highest salary for their job (A) select ename, job, salary from emp where sal in (select max(sal) from emp group by job); (B) select ename, job, salary from emp where (job, sal) in(select job, max(sal) from emp group by job); (C) select ename, job, salary from emp where (job, sal) = (select job, max(sal) from emp group by job); (D) Both B and C
Expert Answer:
Answer rating: 100% (QA)
All the answers generate an error due to a typo However if you replace sal ... View the full answer
Related Book For
Fundamentals of Database Systems
ISBN: 978-0136086208
6th edition
Authors: Ramez Elmasri, Shamkant Navathe
Posted Date:
Students also viewed these programming questions
-
Consider the following relations for an order-processing application database at ABC, Inc. ORDER (O#, Odate, Cust#, Total_amount) ORDER-ITEM (O#, I#, Qty_ordered, Total_price, Discount%) Assume that...
-
Consider the following relations for a database that keeps track of business trips of salespersons in a sales office: SALESPERSON (SSN, Name, Start_Year, Dept_No) TRIP (SSN, From_City, To_City,...
-
Consider the following relations for a database that keeps track of student enrollment in courses and the books adopted for each course: STUDENT (SSN, Name, Major, Bdate) COURSE (Course#, Quarter,...
-
In Exercises 7683, use a graphing utility to graph the function. Use the graph to determine whether the function has an inverse that is a function (that is, whether the function is one-to-one). f(x)...
-
What are the advantages and disadvantages of using a bar chart, a pie chart, and a Pareto chart? Discuss.
-
Approximate the integral R (x,y) dA by dividing the rectangle R with vertices (0, 0), (4, 0), (4, 2), and (0, 2) into eight equal squares and finding the sum where (x i , y i ) is the center of the...
-
An engineering laboratory experiment uses a triangular weir in an open channel to measure flow rate. The nominal weir angle is \(90^{\circ}\). In a certain test, the head of water above the weir was...
-
Red Line Railroad Inc. has three regional divisions organized as profit centers. The chief executive officer (CEO) evaluates divisional performance, using income from operations as a percent of...
-
Mayweather Auto Inc. (Mayweather) sold a new limited-edition SUV to Frakes Ltd. (Frakes) on June 1, for $170,000. The SUV has a normal selling price of $185,000 and thus the price charged to Frakes...
-
. With the information generated from the following table derivate from the Bureau of Economic Analysis (https://apps.bea.gov/iTable/index_nipa.cfm), please do the regression analysis, with the...
-
If you want to know how much you need to save now to have $1,000,000 for retirement, you would use? Question 8 options: a) future value computation. b) the rule of 72 computation. c) present value...
-
Using the St. Louis Fed website (FRED), chart the Merrill Lynch HighYield (speculative grade) Master II optionadjusted corporate bond spread. How has it behaved over the business cycle?
-
Prepare a flowchart on obtaining an injunction (or restraining order) against violence threatened by a husband against his wife in your state.
-
Media Moguls hired Charissa Love, an African-American, for the position of social media coordinator. Revise the following sentences to reduce bias (e.g., gender, racial, ethnic, age, and disability).
-
An ideal gas initially at volume \(V_{1}\), pressure \(P_{1}\), and temperature \(T_{1}\) undergoes an isobaric process that changes its temperature to \(T_{2}\). The gas immediately undergoes an...
-
Graphically depict a shut-down case for a monopolistic competitive firm. When should any firm shut down in the short run?
-
Exception Handling and Input/Output Streams Instructions: Part 1: Exception Handling (40 points) Create a Java class called TemperatureConverter that includes the following methods:...
-
Use a calculator to evaluate the expression. Round your result to the nearest thousandth. V (32 + #)
-
Consider the database shown in Figure 1.2, whose schema is shown in Figure 2.1. What are the referential integrity constraints that should hold on the schema? Write appropriate SQL DDL statements to...
-
Consider the following six relations for an order-processing database application in a company: CUSTOMER (Cust#, Cname, City) ORDER (Order#, Odate, Cust#, Ord_Amt) ORDER_ITEM (Order#, Item#, Qty)...
-
Discuss which of the updates that created each of the tuples shown in Figure 26.9 were applied retroactively and which were applied proactively.
-
A hydraulic lift in a service station has a \(32.50-\mathrm{cm}\)-diameter ram that slides in a \(32.52-\mathrm{cm}\)-diameter cylinder. The annular space is filled with SAE 10 oil at \(20^{\circ}...
-
A 10-kg block slides down a smooth inclined surface as shown in Fig. P1.80. Determine the terminal velocity of the block if the \(0.1-\mathrm{mm}\) gap between the block and the surface contains SAE...
-
Oil (absolute viscosity \(=0.0003 \mathrm{lb} \cdot \mathrm{s} / \mathrm{ft}^{2}\), density \(=50\) \(\mathrm{lbm} / \mathrm{ft}^{3}\) ) flows in the boundary layer, as shown in Fig. P1.82. The plate...
Study smarter with the SolutionInn App