Posted by Bob Stearns on 10/01/56 11:33
bigsamurai wrote:
> I have a field in a table called ood_date. I want to run a query that
> will tell me the number of entries between 2 given dates. the end
> result would be...
>
> officer name number of entries number of hours
>
>
> I have the name and the time issue resolved but i can not egt the query
> to either understand the count(ood_date) ot the tot(ood_date) in the
> select statement.
>
> Thoughts?
>
SELECT "officer name", count(ood_date) as N_o_E, sum(hours) as N_o_H
FROM <table_name>
GROUP BY "officer name"
WHERE ood_date BETWEEN $d1 AND $d2
ORDER BY "officer name"
is close, and the best I can do given the lack of both DDL and sample data
Navigation:
[Reply to this message]
|