adspace


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 / anil panwar

select t1.id, t2.region from table t1 left outer Join table2 t2
on t1.id=t2.id
where t1.id in (select id from table1 where age=(select
max(age) from table1))

Is This Answer Correct ?    1 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is a scheduled job or what is a scheduled task?

1044


Why use identity in sql server?

1210


What is an indexed view?

1030


Why we use the openxml clause?

1088


What is self contained sub query?

1148


How do I start sql server 2017?

1024


How to convert numeric expression data types using the cast() function?

1157


What is the difference between for xml raw and for xml auto?

1125


If any stored procedure is encrypted, then can we see its definition in activity monitor?

1083


What are the different subsets of sql?

1662


How to connect php with different port numbers?

1197


What is in place upgrade in sql server?

1137


What is a view in sql?

1048


what is the Ticketing tool used in Wipro technologies at Bangalore...???

8239


How to enter binary string literals in ms sql server?

1256