Skip to Content
avatar image
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 comment
10|10000 characters needed characters exceeded

  • Get RSS Feed

1 Answer

  • 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 comment
    10|10000 characters needed characters exceeded