I have this SQL Queries,
SELECT PaymentID, CustomerID, PaymentDate, Amount, Balance, Credit
FROM Payment
WHERE (PaymentDate = '2012-11-03')
I also like to print previous Balance and Credit form last transaction of the customer.
This is my try.
SELECT DISTINCT TOP 1 Balance, Credit, PaymentID
FROM Payment
WHERE CustomerID = '??' AND PaymentID < '??'
ORDER BY PaymentID DESC
As you can see this does nothing as Queries are not liked.
I think I have I have to use T-SQL or UNION but have no idea How to implement it.
This kind of Output I am trying to achieve.

Payment Table
PaymentID int
CustomerID varchar(50)
PaymentDate date
Amount decimal(18, 2)
Balance decimal(18, 2)
Credit decimal(18, 2)
Note:
This is for all the customers not only for single customer, it’s like a sale Report.
There are can be more than one payment per customer in a day.
This might get you started