Skip to Content
author's profile photo Former Member
Former Member

Query writing - Identifying payment dates - First to Last

Good afternoon All,

I used to use crystal but haven't for some years and I am a bit rusty and require some help.

I have been asked to identify from a large table spanning over 3 years:

The number of new first payments per financial quarter.

The duration of payments per year e.g. 15 People have paid 3 times over the last three years.

The beginning and end of the payment cycle e.g. 20 People started paying in 2013 but stopped in 2014.

Average amount of first payment

The data in the table (before i consider grouping) looks like this:

Contacts Number Payment Date Payment Amount 6 17/02/2015 00:00:00 10.00 6 17/03/2015 00:00:00 10.00 6 17/04/2015 00:00:00 10.00 6 26/06/2014 00:00:00 10.00 6 26/03/2014 00:00:00 5.00 7 15/01/2014 00:00:00 25.00 7 15/01/2013 00:00:00 25.00

I have a feeling that this is very straight for

Add a comment
10|10000 characters needed characters exceeded

Assigned Tags

Related questions

1 Answer

  • Posted on Oct 21, 2015 at 04:54 AM

    This is NOT very straight-forward. In fact, there is no way to determine all of this information by just linking tables together in Crystal. This would require either a fairly complex Command (SQL Select statement) or a stored procedure - specifically because you need to look at "past" data to determine what the "new" payments are in each quarter. The logic is fairly complex, and without knowing anything about your database, there's not much we can do to help.

    -Dell

    Add a comment
    10|10000 characters needed characters exceeded

Before answering

You should only submit an answer when you are proposing a solution to the poster's problem. If you want the poster to clarify the question or provide more information, please leave a comment instead, requesting additional details. When answering, please include specifics, such as step-by-step instructions, context for the solution, and links to useful resources. Also, please make sure that you answer complies with our Rules of Engagement.
You must be Logged in to submit an answer.

Up to 10 attachments (including images) can be used with a maximum of 1.0 MB each and 10.5 MB total.