Click here to Skip to main content
15,887,214 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more:
I have two tables in sql. One records customer information and one records their purchase information. Now I want to show the last purchase of customers who have passed 30 days after their purchase in a table.
Thank you
There is also no relationsship between the tables.
And I use the C # linq method 

I can get the last date of buying one person and Lee has a problem for all customers. I tried many codes and it did not work. The table structure is as follows Customer table: customer code first name and last name And shopping table: customer code Product Name purchase date

What I have tried:

<pre>I tried many codes and it did not work. The table structure is as follows Customer table: customer code first name and last name And shopping table: customer code Product Name purchase date 
Posted
Updated 14-Apr-21 15:36pm
Comments
Richard MacCutchan 15-Apr-21 5:43am    
You state above, "There is also no relationsship between the tables.". But both tables include customer code, so that is the relationship. You need to use the Improve question link below your question, and add complete details, including the code that you have tried.

1 solution

Quote:
There is also no relationship between the tables.


If there's no relationship between the customer table and the purchase table, you can't do anything, right? Why would there not be a relationship between the customer and what the customer purchases?
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900