‎2007 Jun 05 12:17 PM
SELECT clifnr MAX( beindt )
SUM( b~menge ) ...........
what does this mean?
plz explain me
‎2007 Jun 05 12:20 PM
MAX( b~eindt ) - it will get latest date data from database table
SUM - it will calulate the all the values qty,in thi condition you need to add group by .
Message was edited by:
Seshu Maramreddy
‎2007 Jun 05 12:19 PM
Hi,
1. It means that
2. From the table, there must be field lifnr,
3. So based on lifnr / grouped by lifnr,
fetch some numeric values,
4. In that,
against each lifnr,
we will get 2 numeric values
a) Maximum of eindt field
b) sum of menge field
regards,
amit m.
‎2007 Jun 05 12:21 PM
the problem is i didnt got that MAX and SUM ?
What it will give
‎2007 Jun 05 12:24 PM
Hi again,
1. Max and sum are called aggregate values.
2. Suppose we have
lifnr field 1 fiedl2
1 50 45
1 60 100
2 30 10
then for lifnr=1
Max (Maximum) will be 60
Sum (Total) will be 110
Similary for lifnr = 2
Max (Maximum) will be 30
Sum (Total) will be 10
regards,
amit m.
‎2007 Jun 05 12:20 PM
MAX( b~eindt ) - it will get latest date data from database table
SUM - it will calulate the all the values qty,in thi condition you need to add group by .
Message was edited by:
Seshu Maramreddy
‎2007 Jun 05 12:20 PM
Hi
You r selecting lifnr from one table for which u have given alias name as 'C', maximum number of eindt this field from a different table and you are summing up the quantity (menge).
Regards
Haritha.
‎2007 Jun 05 12:23 PM
This syntax is used when you have join on multiple tables. To differentiate the
fields from different tables, tables are aliased .
‎2007 Jun 05 12:23 PM
it will sum all menge by SUM,
and the latest date is got by MAX,
regards
prabhu
‎2007 Jun 05 12:25 PM
well it will select you the lifnr, the max of eindt and the sum of menge.
Tho its not too clever to sum wher you in first hand do a MAX. Since a MAX will get you ONE record only always.
the "~" symbol secifies that the select will be done down do the DB tables, not using an buffers or chaches or transparent tables.