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 / monal
SELECT REGION FROM T2 T2 INNER JOIN
T1 T1 ON T1.EMPID = T2.EMPID INNER JOIN
(SELECT MAX(AGE) AGE FROM T1) TBLAGE ON T1.AGE = TBLAGE.AGE
| Is This Answer Correct ? | 1 Yes | 0 No |
Post New Answer View All Answers
Can one drop a column from a table?
What is the use of sign function?
What is the use of “join” in sql server?
Difference between LEN() and DATALENGTH() in sql server ?
Working with TLogs
What do you understand by a stored procedure?
How will you add a dimension to cube? : sql server analysis services, ssas
what is a traditional network library for sql servers? : Sql server database administration
What is join and name different type of joins?
What is the current pricing model of SQL Azure?
How to get the definition of a trigger back?
Is it true that rules do not apply to data already existing in a database at the time the rule is created?
What is SubQuery in SQL Server 2008
Issues related in upgrading SQL Server 2000 to 2005 / 2008
Explain table valued parameters in sql server? Why tvp used?