[Babase] query for marie
Karl O. Pinc
kop at meme.com
Fri May 11 08:54:34 EDT 2007
On 05/10/2007 09:19:27 PM, Susan Alberts wrote:
> Marie,
>
> I think this query does it.
Thanks Susan. I guess I was not focused on this yesterday.
> Main problem: The connection of members.date = cycpoints.date was
> missing -- we only connected members.sname to cycles.sname. This
> meant that every date in members was linking to every row in
> cycpoints where sname matched and it returned thousands of extra
> lines for every ddate.
That is the real problem. We can return gobs of rows and then
(I think) reduce them again using the DISTINCT keyword
to get distinct cids and thus distinct cycles for counting
purposes, but yours is really the right way to count Ddates.
> Secondary problem: we selected on members.date instead of
> cycpoints.date. I am not sure whether this was a problem or not but
> on thinking about it I realized that the date in cycpoints was the
> relevant date (it was the D date) and not the date in members.
This is not a problem, so long as members.date = cycpoints.date. :-)
>
>
> select count(cycles.cid), members.grp,
Note that with Susan's query you could count(*)
to count how many rows are returned instead of count(cycles.cid).
Karl <kop at meme.com>
Free Software: "You don't pay back, you pay forward."
-- Robert A. Heinlein
More information about the Babase
mailing list