You may try this:-
select store, count(*) as Transt from table
where Date = '9/01/13'
group by store
Pregunta
Trans|Store|Date
1 | 10 |9/01/13
2 | 10 |9/01/13
3 | 20 |9/01/13
4 | 10 |9/02/13
What I am trying to query is
(For Date = 9/01/13)
Store|#Trans|Date
10 | 2 |9/01/13
20 | 1 |9/01/13
How do I achieve this any ideas ?
Solución
You may try this:-
select store, count(*) as Transt from table
where Date = '9/01/13'
group by store
Otros consejos
If that doesn't do it, this might.
Select
count(Store) as #Trans,
Store
from
tablename
where
Date = '9/01/13'
group by
Store
This smells like homework something fierce though.