-3

What is the function of "where" and "expression" in the groupby? why we are using that in the design query for getting sorted output? Expecting a clear explanation.

1 Answers1

0

It's not "in the Group By".

It is, that this column/field can either be used with Where (a criteria), be an expression, or have Group By or another aggregating function applied.

marc_s
  • 732,580
  • 175
  • 1,330
  • 1,459
Gustav
  • 53,498
  • 7
  • 29
  • 55
  • I made a new table by doing group-by max from table-A, through Query design. Now i need to include a new column from table-A that matches the content in the Max column(which i already done max group-by). I try to do some ways but its picking the whole data in Table-A( but i need only matching contents) – vinu lopez Mar 05 '15 at 08:56
  • Create a query with a join between the field in the one table and the max value in the other table. – Gustav Mar 05 '15 at 10:43
  • How can i write query for joining the columns in two different tables – vinu lopez Mar 09 '15 at 09:55
  • You can join two table with: select table1.*, table2.* from table1, table2 where table1.somefield = table2.someotherfield. However, they must be both text or numeric. If not, convert like this: where table1.somefield = val(table2.someotherfield) .. or: where table1.somefield = str(table2.someotherfield) .. or vice versa to convert the field from table1 – Gustav Mar 09 '15 at 10:05