tags:

views:

9

answers:

1

Hello,

I have a table with about 200 records, each record has a date, adzone, revenue, clicks, cpm.

What is the proper sqlite statement total count of how many records where grouped in the same statement?

select SUM(revenue), SUM(clicks), adzone
  from mytable
  where date='12345'
  group by adzone
A: 

Add a COUNT(1) column:

select SUM(revenue), SUM(clicks), adzone, COUNT(1)
  from mytable
 where date='12345'
 group by adzone
Marcelo Cantos
that helped me out, thanks!
Joe