March 10, 2009 at 10:16 am
How do I get from results below to the results at the bottom of this message?
iddpid cabid stlid joid qty
1127133252
2127133852
3127134052
412716353
5127162953
6127163953
Trying to get results as:
iddpid cabid stlid joid qty
3127134056
6127163959
March 10, 2009 at 10:22 am
you want to use MAX() to get the highest values,sum() to add stuff, and group by the items that you want to...well..group by. something like this:
select
max(id),dpid,cabid,max(stlid),joid,sum(qty)
from your table
group by dpid,cabid,joid
Rad (3/10/2009)
How do I get from results below to the results at the bottom of this message?iddpid cabid stlid joid qty
1127133252
2127133852
3127134052
412716353
5127162953
6127163953
Trying to get results as:
iddpid cabid stlid joid qty
3127134056
6127163959
Lowell
March 10, 2009 at 10:31 am
Perfect, thanks alot
Viewing 3 posts - 1 through 2 (of 2 total)
You must be logged in to reply to this topic. Login to reply