I am working with SQL in R. I want to get the minimum date by choosing the minimum value of the column 'day;, the minimum value of the column 'month' and the minimum value of the column 'year'.
I have tried this by the following code:
dbGetQuery(db, "SELECT day, month, year
FROM surveys
WHERE year = (SELECT MIN(year) FROM surveys);")
But my output is not one value, how can I get one value in my output and not a list of values?