It may best to describe the problem with an example:
Is it possible to query for the below data and group by fruit so that we have for each fruit, the number of times the price is quoted and the latest price (the data is sorted by time).
Table data is as below:
fruit -count -price
Apple 3 $12.5
grape 2 $9
Using: Sybase ASE, Embarcadero Rapid SQL is the software.