เก็บ ข้อมูลวันที่ แบบนี้ ค่ะ 2009-11-20
ตอนนี้ใช้วิธีนี้ในการหาค่าค่ะ
select sum(profit),extract(month from a.pdate) as MONTH
from a
where (extract(month from a.pdate)=12)
or (extract(month a.pdate)=11)
or (extract(month from a.pdate)=10)
or (extract(month from a.pdate)=9)
or (extract(month from a.pdate)=8)
or (extract(month from a.pdate)=7)
or (extract(month from a.pdate)=6)
or (extract(month from a.pdate)=5)
or (extract(month from a.pdate)=4)
or (extract(month from a.pdate)=3)
or (extract(month from a.pdate)=2)
or (extract(month from a.pdate)=1)
group by extract(month from a.pdate)