1
我有一個包含約200條記錄的表,每條記錄都有一個日期,adzone,收入,點擊次數,cpm。sqlite group by statement
什麼是正確的sqlite語句總數有多少記錄在同一個語句分組?
select SUM(revenue), SUM(clicks), adzone
from mytable
where date='12345'
group by adzone
我有一個包含約200條記錄的表,每條記錄都有一個日期,adzone,收入,點擊次數,cpm。sqlite group by statement
什麼是正確的sqlite語句總數有多少記錄在同一個語句分組?
select SUM(revenue), SUM(clicks), adzone
from mytable
where date='12345'
group by adzone
添加COUNT(1)
柱:
select SUM(revenue), SUM(clicks), adzone, COUNT(1)
from mytable
where date='12345'
group by adzone
,幫助我,謝謝! – Joe 2010-10-24 22:06:45