看板 Database 關於我們 聯絡資訊
TABLE1 店 日期 時間 金額 1 20110211 100000 100000 1 20110211 101055 100 1 20110211 105555 10000 1 20110212 110000 1 1 20110215 110150 1000 2 20110101 185050 100 2 2 2 3 3 請問該如何算出在日期20110211 10點到11點的加總金額呢....? 新手發問 謝謝!! -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 210.59.162.42 ※ 編輯: howard0215 來自: 210.59.162.42 (02/17 18:37)
willfred: select sum(金額) from TABLE1 where 日期=20110211 and 03/04 11:00
willfred:時間 between 100000 and 110000 03/04 11:09