I want to develop a tool to do following analysis with SQL. How to write the code for the same?

  • Company Y is a manufacturer of consumer products and engages directly with the customers. Customers have the provision of purchasing products on credit. Prepare an ageing report using SQL to identify how much payment has been due for:
    a.      90-120 days
    b.      60-90 days
    c.      30-60 days
    d.      0-30 days
    This ageing should be calculated as on 6th April 2016.
    An example is attached to illustrate the due amount. Negative amount signifies that payment has been received from the customer.

    Customer Name Date of Credit Amount Ageing Bucket ( as on 06-04-2017) Due balance
    Customer A 01/01/2017 10000.00 90 - 120 0
    Customer A 01/02/2017 20000.00 60 - 90 17000
    Customer A 04/03/2017 5000.00 30 - 60 5000
    Customer A 04/04/2017 6000.00 0-30 6000
    Customer A 07/04/2017 -13000.00    
             
    Total Due Amount       28000

    Use the below mentioned data for your analysis

    Customer Name Date of Credit  Amount 
    Customer A 01 January 2017          10,000
    Customer A 01 February 2017          20,000
    Customer A 04 March 2017            -5,000
    Customer A 04 April 2017            6,000
    Customer A 07 April 2017 -       13,000
    Customer B 03 January 2017          -10,100
    Customer B 07 February 2017          12,100
    Customer B 05 March 2017          14,100
    Customer B 06 March 2017          16,100
    Customer B 09 March 2017 -       25,000
    Customer C 04 March 2017          15,000
    Customer C 04 April 2017          26,000
    Customer C 07 April 2017 -         8,000
    Customer C 03 January 2017          16,100
    Customer C 07 February 2017 -             900
  • vibhoryadav23 - Tuesday, May 9, 2017 1:24 AM

    Company Y is a manufacturer of consumer products and engages directly with the customers. Customers have the provision of purchasing products on credit. Prepare an ageing report using SQL to identify how much payment has been due for:
    a.      90-120 days
    b.      60-90 days
    c.      30-60 days
    d.      0-30 days
    This ageing should be calculated as on 6th April 2016.
    An example is attached to illustrate the due amount. Negative amount signifies that payment has been received from the customer.

    Customer Name Date of Credit Amount Ageing Bucket ( as on 06-04-2017) Due balance
    Customer A 01/01/2017 10000.00 90 - 120 0
    Customer A 01/02/2017 20000.00 60 - 90 17000
    Customer A 04/03/2017 5000.00 30 - 60 5000
    Customer A 04/04/2017 6000.00 0-30 6000
    Customer A 07/04/2017 -13000.00    
             
    Total Due Amount       28000

    Use the below mentioned data for your analysis

    Customer Name Date of Credit  Amount 
    Customer A 01 January 2017          10,000
    Customer A 01 February 2017          20,000
    Customer A 04 March 2017            -5,000
    Customer A 04 April 2017            6,000
    Customer A 07 April 2017 -       13,000
    Customer B 03 January 2017          -10,100
    Customer B 07 February 2017          12,100
    Customer B 05 March 2017          14,100
    Customer B 06 March 2017          16,100
    Customer B 09 March 2017 -       25,000
    Customer C 04 March 2017          15,000
    Customer C 04 April 2017          26,000
    Customer C 07 April 2017 -         8,000
    Customer C 03 January 2017          16,100
    Customer C 07 February 2017 -             900

    So what is the problem? Certainly you are not asking us to do the work for you😉
    😎

Viewing 2 posts - 1 through 2 (of 2 total)

You must be logged in to reply to this topic. Login to reply