S
subs
Lane Transport amt
A 560
A 890
A 560
A 560
B 890
C 740
C 760
Output required
Lane Tansport Amt
A 560
B 890
C 750
what will be the SQL query? the query must select the highest
frequency transport amt for every lane whenever there is a repeat of
transport amt. for example for lane A- 560 is repeated thrice. so 560
should be selected for A.
For B, there is only one amt so 890 should be selected. For C there is
no repeat, so in this case, avg should be taken i.e avg of 740 and
760.
what will be query which can satisfy all conditions and can come up
the output like above?
Please help
A 560
A 890
A 560
A 560
B 890
C 740
C 760
Output required
Lane Tansport Amt
A 560
B 890
C 750
what will be the SQL query? the query must select the highest
frequency transport amt for every lane whenever there is a repeat of
transport amt. for example for lane A- 560 is repeated thrice. so 560
should be selected for A.
For B, there is only one amt so 890 should be selected. For C there is
no repeat, so in this case, avg should be taken i.e avg of 740 and
760.
what will be query which can satisfy all conditions and can come up
the output like above?
Please help