You are here: Re: number of entries in a date column « PHP SQL « IT news, forums, messages
Re: number of entries in a date column

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]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация