complex query
From: ford6 (anonymous_at_discussions.microsoft.com)
Date: 06/08/04
- Next message: Sam: "Re: Need advice w/ table design"
- Previous message: Mingqing Cheng [MSFT]: "RE: Saving Danish Characters to SQL ser 2000"
- Next in thread: Uri Dimant: "Re: complex query"
- Reply: Uri Dimant: "Re: complex query"
- Reply: John Gilson: "Re: complex query"
- Reply: Joe Celko: "Re: complex query"
- Messages sorted by: [ date ] [ thread ]
Date: Mon, 7 Jun 2004 20:21:44 -0700
I have a table that has customers. I have another table
with a record for each individual customer purchase which
includes date of purchase. So repeat customers have
multiple entries in the purchases database. I need to
find out the following: How many customers purchased in a
given month, and for how many was that their first
purchase and for how many was it a repeat? I know that if
I can figure out either how many first time buyers or how
many repeat buyers, and I'll have the other one. The
Current Month AND first purchase part are throwing me.
Does this have to be two queries?
- Next message: Sam: "Re: Need advice w/ table design"
- Previous message: Mingqing Cheng [MSFT]: "RE: Saving Danish Characters to SQL ser 2000"
- Next in thread: Uri Dimant: "Re: complex query"
- Reply: Uri Dimant: "Re: complex query"
- Reply: John Gilson: "Re: complex query"
- Reply: Joe Celko: "Re: complex query"
- Messages sorted by: [ date ] [ thread ]
Relevant Pages
|