Computing date from record fields In an SQLite DB I have a table with a station integer field and an at date field.

How can I combine these two values to obtain, in a WHERE clause a date which is at plus station months?

I.e. for a record with at = '2019-01-01' and station = 3, my WHERE clause should look like WHERE before &lt;= '2019-04-01' 

I have looked at several resources online, including https://www.sqlite.org/lang_datefunc.html but no one refers to using filed value to compute a date.
You can use the following:

 WHERE before &lt;=  date(at, (station || ' months') )


Please note that according to the documentation:


  "±NNN months" works by rendering the original date into the YYYY-MM-DD format, adding the ±NNN to the MM month value, then normalizing the result. Thus, for example, the data 2001-03-31 modified by '+1 month' initially yields 2001-04-31, but April only has 30 days so the date is normalized to 2001-05-01. A similar effect occurs when the original date is February 29 of a leapyear and the modifier is ±N years where N is not a multiple of four.