Date: 2013-04-29 11:15 am (UTC)
Можно. Что-то вроде
select * from
(select month,1 k, item, sum(amount) from Items
group by 1,2,3
union
select month,2 k, '', sum(amount) from items
group by 1,2,3
) order by month,k

ну или помудрить с CTE, чтобы два раза не вставать к основной таблице.
This account has disabled anonymous posting.
If you don't have an account you can create one now.
HTML doesn't work in the subject.
More info about formatting

Profile

metaclass: (Default)
metaclass

April 2017

S M T W T F S
      1
2345678
9101112 131415
16171819202122
23242526272829
30      

Most Popular Tags

Style Credit

Expand Cut Tags

No cut tags
Page generated Jun. 20th, 2025 10:55 am
Powered by Dreamwidth Studios