Y
yuri greene
I am trying to write a query to find the first time a
customer purchased an item. I have tried to use a subquery
but am unable to get it to work correctly.
Here is the SQL of the fields if someone could help me
with this.
SELECT SH_ORDDT.CO_NUMBER, SH_ORDDT.CUST_ID,
SH_ORDDT.ITEM, SH_ORDDT.LN_CREATE_DATE
FROM SH_ORDDT
GROUP BY SH_ORDDT.CO_NUMBER, SH_ORDDT.CUST_ID,
SH_ORDDT.ITEM, SH_ORDDT.LN_CREATE_DATE
HAVING (((SH_ORDDT.ITEM) Like "*-*-F*"));
What I need to have the first or min LN_CREATE_DATE for
the item for each customer. I do however need the
co_number field to link to another query and this is where
it is giving me trouble. I can get it to work without
this field.
customer purchased an item. I have tried to use a subquery
but am unable to get it to work correctly.
Here is the SQL of the fields if someone could help me
with this.
SELECT SH_ORDDT.CO_NUMBER, SH_ORDDT.CUST_ID,
SH_ORDDT.ITEM, SH_ORDDT.LN_CREATE_DATE
FROM SH_ORDDT
GROUP BY SH_ORDDT.CO_NUMBER, SH_ORDDT.CUST_ID,
SH_ORDDT.ITEM, SH_ORDDT.LN_CREATE_DATE
HAVING (((SH_ORDDT.ITEM) Like "*-*-F*"));
What I need to have the first or min LN_CREATE_DATE for
the item for each customer. I do however need the
co_number field to link to another query and this is where
it is giving me trouble. I can get it to work without
this field.