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
What is NOT NULL Constraint in sql server 2012?
Can you give me some DBCC command options?(Database consistency check) - DBCC CHECKDB - Ensures that tables in the db and the indexes are correctly linked.and DBCC CHECKALLOC - To check that all pages in a db are correctly allocated. DBCC SQLPERF - It gives report on current usage of transaction log in percentage. DBCC CHECKFILEGROUP - Checks all tables file group for any damage.
How do I find the default sql server instance?
What options are there to delete rows on the publisher and not on the subscriber? : sql server replication
what are the disadvantages of cursors? : Sql server database administration
What is the difference between dataadapter and datareader?
What are the different types of indexes?
How to create a view using data from another view?
Can you use order by when defining a view?
How do I get to sql server configuration manager?
What are the types of sql server?
Explain logical operators in sql server?
What is hierarchy, what are its types and difference between them? : sql server analysis services, ssas
How to compare the top two records using sql?
How to verify the port number of the sql server?