0
Select distinct a.*,
b.scannerid,
date(b.datetime) as datetime,
b.status from studentdetails a
LEFT OUTER JOIN discovereddevices b
ON a.bluetoothid = b.blueid and date (b.datetime) = CURRENT_DATE