please can anyone answer this query
Table 1 has 2 columns: EmployeeId,Age
Table 2 has 2 columns: EmployeeId, Region
Write SQL to Find the region who has the oldest person
Answer Posted / krishna murari chaubey
create table Employee(empId int,age int)
create table Area(empId int,Region varchar(20))
Use Inner Join
select e.empid,e.age,a.region from Employee e inner join
area a on e.empid=a.empid and e.age in
(select max(age) from Employee)
OR
select empid,region from area where empid in
(select empid from Employee where age
in(select max(age) from Employee))
| Is This Answer Correct ? | 2 Yes | 0 No |
Post New Answer View All Answers
What is the new security features added in sql server 2014? : sql server security
What are the advantages of log shipping?
How to get the definition of a trigger back?
List the advantages of using stored procedures?
What is log ldf?
What are two difference between sql azure and azure tables?
Why do you want to join software field as you have done your BE in Electronics?
What is create statement?
What is the report builder?
What is rtm version in sql server?
How to change server name in sql server?
How to defragment indexes with alter index ... Reorganize?
What is checkpoint process in the sql server?
What is transaction server consistency?
What are data driven subscriptions?