I have R code that is connected to my PostgresDB.
It gives me for every table exactly one row with one column of type Boolean
res <- lapply(all_tables,
              function(table){
                sqlStatement <- 
                  paste("SELECT CASE WHEN MAX(date) = current_date-1 then TRUE else FALSE end as x from "
                        ,table)
                dbGetQuery(con, sqlStatement)
              })
names(res) <- all_tables
res
The result is somewhat satisfying:
datawarehouse.table1
     x
1 TRUE
datawarehouse.table2
      x
1 FALSE
datawarehouse.table3
      x
1 FALSE
What I actually need is something like this dataframe:
table                  valid
datawarehouse.table1   TRUE
....
What I don't understand are those x's and those 1's.
 
     
    