-
PostgreSQL : Write a function to iterate over the rows of a table and Update the Data
Assume that you have a table where Subscriptions are stored, example given you have bought a new Spotify subscription, for 3, 6 or 12 months. In this table , the data that are kept are : the creation date (created_at) last update timestamp (last_updated) start_date of Subscription start_date of Subscription end_date of Subscription duration_in_months (3,6…