Sir,
Below is my table
sno group type volume expiry_date date donor_id donor_name
1 AB AB- 1200.35 2012-08-31 2012-08-14 NULL NULL
2 AB AB+ 123.23 2012-08-27 2012-08-14 NULL NULL
3 A A+ 600.31 2012-08-25 2012-08-14 NULL NULL
4 A A- 145 2012-09-15 2012-08-14 NULL NULL
5 B B+ 600.31 2012-10-19 2012-08-14 NULL NULL
6 B B- 123.23 2012-09-15 2012-08-14 NULL NULL
7 O O+ 15478.01 2012-10-26 2012-08-14 NULL NULL
8 O O- 15478.01 2012-08-28 2012-08-14 NULL NULL
18 A A- 600.31 2012-09-08 2012-08-14 NULL NULL
11 AB AB- 152.3 2012-08-23 2012-01-14 401 Jhon
12 O O+ 156.23 2012-08-22 2012-08-14 402 rama
13 B B+ 1457 2012-08-29 2012-08-14 403 maha
14 A A+ 4587 2012-08-29 2012-08-14 405 vigkey
15 AB AB- 100 2012-08-21 2012-08-14 401 Jhon
16 AB AB+ 152.3 2012-09-08 2012-08-14 404 Amala
17 B B+ 200 2012-08-14 2012-08-14 406 Deepi
i want all column and group by only type and expiry date
my query is
select type,expiry_date,sno,group,type,date,donor_id,donor_name,SUM(volume) as sum from blood_stock group bytype,expiry_date,sno,group,type,date,donor_id,donor_name order by type
but above query group the data by all fields.
How to get group by type and expiry datewith all column value?