Re: SQL query

2020-04-14 Thread Skylar Thompson
You're welcome! Glad that ended up working, despite not having a great way to test it here. :) On Tue, Apr 14, 2020 at 12:07:33PM +, Loon, Eric van (ITOP NS) - KLM wrote: > Hi Skylar, > > I had to change your suggestion a little bit, but this one is working: > > select a.node_name, case when

Re: SQL query

2020-04-14 Thread Loon, Eric van (ITOP NS) - KLM
Hi Skylar, I had to change your suggestion a little bit, but this one is working: select a.node_name, case when b.count is null then 0 else b.count end as count from nodes a left join (select node_name,count(*) as count from backups where (days(current_date) - days(backup_date) >= 30) and