sql - How can I use a 'group by' (or similar) statement to aggregate a few specified rows? -



sql - How can I use a 'group by' (or similar) statement to aggregate a few specified rows? -

i have teradata table next structure

id value -- ----- 03 300 05 200 08 900

i need create view on top of table grouping few specified ids , aggregate values.

id value --------- ----- 03 , 05 500 08 900

is there way this?

assuming id character, otherwise need typecasts:

select case when id in ('03','05') '03 , 05' else id end, sum(value) tab grouping 1

sql database view aggregate-functions teradata

Comments

Popular posts from this blog

php - Android app custom user registration and login with cookie using facebook sdk -

django - Access session in user model .save() -

php - .htaccess Multiple Rewrite Rules / Prioritizing -