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
Explain the steps to create and execute a user-defined function in the sql server?
How to remove duplicate rows from table?
Explain the properties of a relational table?
What is difference between rownum and row_number?
What is application role in sql server database security? : sql server security
What is difference between views and tables?
What are the different types of data sources in ssrs?
Can sql servers link to other servers like oracle?
What is save transaction and save point?
Where the sql logs gets stored?
Explain the working of sql privileges?
What is t-sql script to take database offline – take database online.
Would you store your query in a ssrs report or a database server? State the reason why?
What is a ddl statement?
What is the architecture of ms sql reporting service?