10 Replies Latest reply: Mar 14, 2017 11:23 PM by Supriya R RSS

    select first and second latest record

    Supriya R



      i have Active campaigns, where expiration date is greater than today(). In this i need to build a line graph with first latest, second latest and third latest record.


      Below is the script


      LOAD `campaign_id`,

      `batch_id` ,

      `start_date` ,

      date(floor(expiration_date),'MM-DD-YYYY') as expiration_date,


      SQL SELECT `campaign_id`,







      In front end

      sum({$< client_id={'15'},batch_id={'30'},expiration_date = {"$('>' & Date(Today(),'MM-DD-YYYY'))"}>}opened)


      Now i need to get sum of opened for first latest, second latest and third latest record specifically. How to get those,


      Any kind of help or suggestion is appreciated.