Talk About Network

Google


Register and Login
Nick
Password
Register create new account Sign up is FREE and you can post replies, new topics, bookmark posts and more!
Recover lost password


Data Bases > Oracle Miscellaneous > query
Latest [ Topics | Posts ] Archive Post A New Topic Post a Reply
<< Topic < Post Post 1 of 18 Topic 6879 of 6987
Post > Topic >>

query

by "amerar@[EMAIL PROTECTED] " <amerar@[EMAIL PROTECTED] > May 6, 2008 at 01:54 PM

This simple query is driving me nuts.

I have a simple table:

customer_id
action_date
action

I want to get a distinct count of customer_id where the action = 'A'
and the MAX action date is between 01/01/2005 and 03/01/2005.

This seems simple, and here is my query:

SELECT MAX(action_date) action_date, count(distinct(customer_id))
FROM email_product_hist
WHERE action = 'A'
  AND action_date BETWEEN TO_DATE('01012005','MMDDYYYY') AND
TO_DATE('03312005','MMDDYYYY')
  AND customer_id NOT IN (SELECT customer_id FROM customer_account);

But people are telling me that this does not render the correct
results.......is there something I am missing??

Thanks!




 18 Posts in Topic:
query
"amerar@[EMAIL PROTE  2008-05-06 13:54:19 
Re: query
Mark D Powell <Mark.Po  2008-05-07 09:44:54 
Re: query
"amerar@[EMAIL PROTE  2008-05-07 10:50:02 
Re: query
Urs Metzger <urs@[EMAI  2008-05-08 20:45:15 
Re: query
gazzag <gareth@[EMAIL   2008-05-08 04:32:06 
Re: query
"amerar@[EMAIL PROTE  2008-05-08 05:33:56 
Re: query
Ed Prochak <edprochak@  2008-05-08 06:00:03 
Re: query
gazzag <gareth@[EMAIL   2008-05-08 06:21:13 
Re: query
"amerar@[EMAIL PROTE  2008-05-08 07:40:19 
Re: query
gazzag <gareth@[EMAIL   2008-05-08 08:06:11 
Re: query
"amerar@[EMAIL PROTE  2008-05-08 09:37:01 
Re: query
"amerar@[EMAIL PROTE  2008-05-08 11:55:55 
Re: query
Urs Metzger <urs@[EMAI  2008-05-08 21:40:25 
Re: query
Ed Prochak <edprochak@  2008-05-09 05:40:13 
Re: query
"amerar@[EMAIL PROTE  2008-05-12 05:56:52 
Re: query
"amerar@[EMAIL PROTE  2008-05-12 05:59:18 
Re: query
Urs Metzger <urs@[EMAI  2008-05-12 16:57:59 
Re: query
"amerar@[EMAIL PROTE  2008-05-12 06:30:01 

Post A Reply:
  Go here to Signup

AddThis Feed Button


About - Advertising - Contact - Frequently Asked Questions - Privacy Policy - Terms of Use - Signup

Contact
tan13V112 Fri Jul 4 21:11:35 CDT 2008.