0
how to find last and second last record in separate column all customers
how to find last and second last recharge in separate column for all customers in sql Original table Customer _name|Recharge _mrp|Date Output seems like Customer name|last recharge|2nd_last recharge|date I have single table in which have column like customer name, recharge mrp , date how to find last and second last recharge in separate column for all customers in sql I have recharge mrp column i want customer wise last and second last recharge in separate column Please help me.
1 ответ
+ 3
Which SQL engine do you use (MS SQL, MySQL, PostGresql, Oracle...)?
What are the data types of your table?
Did I understand right that you want the customer name and two dates in the result? Your explanation is not very clear.