0
How to use max() in aggregate functions with 2 or 3 tables in it ?? give an example.
2 Respostas
0
not sure I get what you're asking, but I'll try to answer. let's say you want to select field1 from table1 and max(field2) from table2. you need to have a relationship between the 2 tables that will go in the where clause and you have to end your select statement with the group by clause.
for example:
0
select dept, max(salary) from dept_table, emp_table where dept_table.id_dept=emp_table.id_dept group by dept;