Q&A for developers of open-source hardware and software that is compatible with Arduino
select min(create_date) [earliest date (UTC)] , max(create_date) [latest date (UTC)] , getdate() [This query run on (UTC)] , coalesce((select name from sys.databases where name like '%_Temp'), 'None') [Currently restoring] from sys.databases where database_id > 5 select string_agg(status,', ') [Status of database updates] from ( select concat( count(*), ' refreshed ', datediff(d, create_date, getdate()), ' days ago, took ', datediff(n, min(create_date),max(create_date)), ' minutes' ) [Status] from sys.databases where database_id > 5 group by datediff(d, create_date, getdate()) ) data select count(*), datediff(d, create_date, getdate()), datediff(n, min(create_date),max(create_date)), datediff(n, min(create_date),max(create_date)) /convert(decimal, count(*)) , min(create_date),max(create_date) from sys.databases where database_id > 5 group by datediff(d, create_date, getdate())