我需要一些帮助来编写查询以显示尚未向我们报告记录的测量设备列表以及自上次记录以来的天数。
这是表结构:
select d.deviceno, r.lastrecordingdate, --Here's where i need a table to act as a COUNT for --number of days the device has not logged.
from modules m
join devices d on m.deviceid = d.deviceid
join recordings r on m.recordingid = r.recordingid
--i really don't know what to write beyond this. I am drawin