MushroomKing
Registered User.
- Local time
- Yesterday, 16:49
- Joined
- Jun 7, 2018
- Messages
- 100
Hey everyone! I have kind of a silly question:
Im counting some values in a date range.
I would like to sum the values afterwards. But I cant seem to do this in 1 single query. It becomes too "complicated". So what I always do, I make a new query of the current query and sum it there.
My question is, is this the right approach? Its just my way...?
I have this query for example and maybe its possibe in the SQL code to do this?
So what i ultimately try to do:
Pick a date range, and give me the amount of lines.
But now its doing a count, and show me the total for every date...
Im sorry if this is a strange one. Let me know. Thanks in advance!
Im counting some values in a date range.
I would like to sum the values afterwards. But I cant seem to do this in 1 single query. It becomes too "complicated". So what I always do, I make a new query of the current query and sum it there.
My question is, is this the right approach? Its just my way...?
I have this query for example and maybe its possibe in the SQL code to do this?
Code:
SELECT Count(lines.orders) AS CountOfLines, lines.STATUS, Format([SHIPBYDATE],"dd\/mm\/yyyy") AS shipdate
FROM lines
GROUP BY lines.STATUS, Format([orderdate],"dd\/mm\/yyyy")
HAVING (((Format([orderdate],"dd\/mm\/yyyy")) Between Nz([Forms]![main_form]![startdate]) And Nz([Forms]![main_form]![enddate])));
So what i ultimately try to do:
Pick a date range, and give me the amount of lines.
But now its doing a count, and show me the total for every date...
Im sorry if this is a strange one. Let me know. Thanks in advance!