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 / saravanan p

select e.empid,e2.region from empAge1 e,empAge2 e2
where e.empid=e2.empid and e.age in(select max(age) from
empAge1)

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What are the different types of subquery?

1240


You have a stored procedure, which execute a lengthy batch job. This stored procedure is called from a trigger you do not want to slow the data entry process you do not want trigger to wait for this batch job to finish before it completes itself what you can do to speed up the process?

1223


What is a coalesce function?

1292


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

1083


If you're given a raw data table, how would perform etl (extract, transform, load) with sql to obtain the data in a desired format?

1052


How do I start sql server 2017?

1024


List the ways in which dynamic sql can be executed?

1099


How can I check that whether automatic statistic update is enabled or not?

1121


What is temporary table in sql server? Why we use temp table?

1027


Can we make the the chages By Using the Sql if u know any function or process please inform me Actuall result: BRK1 Break 1 Part 1 00:01:00:00 60 BRK1 Break 1 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 BRK2 Break 2 Part 2 00:01:00:00 60 BRK2 Break 2 Part 3 00:01:00:00 60 BRK3 Break 3 Part 1 00:01:00:00 60 BRK3 Break 3 Part 2 00:01:00:00 60 Desired O/P: BRK1 Break 1 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 BRK2 Break 2 Part 1 00:01:00:00 60 Part 2 00:01:00:00 60 Part 3 00:01:00:00 60

2300


what is spatial nonclustered index

1066


Why should you use or avoid select * statements?

1120


What is subquery? Explain the properties of a subquery?

1070


Can sql servers link to other servers like oracle?

928


Is there any performance difference between if exists (select null from table) and if exists (select 1 from table)?

1032