Thanks Gary - done my homework, created a subquery for today's readings 
(since MySQL can't have a subquery in a view) and selected from that.  
Still do not fully understand the where datetime is null part though - but 
it works (down to a second now)

On Wednesday, 9 November 2016 07:32:46 UTC+2, gjr80 wrote:
>
> The WHERE clause must be satisfied or surely there would be no results at 
> all? 
>
> As for optimising, that is left as homework... Seriously, you might find 
> some info by googling 'SQL optimise left join', quite a few results but a 
> bit heavy for me. Sorry but it was a stretch coming up with the query.
>
> Gary
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to