I have three tables (Subscripers, Subscriptions and Payments). Where the every subscriper can do one or more of subscriptions and the subscriper Pay more than one in the payments table of every subscription.
Now .How can I show all subscriptions and get only last payment of each subscription without replication the subscriptions data in the results
how write sql code:
SELECT dbo.Subscriptions.Id, dbo.Subscripers.subscriperName, dbo.Payments.isPaid
FROM dbo.Subscriptions ( ... )
Relationship diagram as: