How to write sql query that will output currency on each 1st date of every month in 2024?
I need to write a query so that there are 12 lines with the current exchange rate on the 1st day of each month 2024. I need to show all 12 months if some information is missing, I need to take previous lag currency value for a particular month.
How to fill in ALL empty values in postgreSQL till the next not empty cell?
I have a table “orders” in postgres with columns “offer_id” and “date”. I need to write a code which must fill in all empty cases in column “offer_id”, using the previous results. I try to use “lag” function but the problem is that it only manages with one single NULL but not several. How to fix that?