Thread
:
Query - select common data from one column and display in severalcolumns
View Single Post
#
2
(
permalink
)
03-01-2008, 03:49 PM
Mark
Posts: n/a
Re: Query - select common data from one column and display in severalcolumns
select Name,
sum(case when note=5 then 1 else 0 end) as note5,
sum(case when note=4 then 1 else 0 end) as note4
from mytable
group by Name
Mark