Sounds like a tricky one. You could try to use \OCP\DB\QueryBuilder\IQueryBuilder::getColumnName for schedule, like $sql->selectAlias($sql->func()->count('NULLIF( ' . $sql->getColumnName('schedule') . '), \'\' )'), 'schedules')
Hi,
thank you for the answer. does not seem so simple
DB-Error is a syntaxerror at schedule 'SELECT \"dataset\", COUNT(\"id\") AS \"dataloads\", COUNT(\"NULLIF( \"schedule\", '' )\") AS \"schedules\" FROM \"oc_analytics_dataload\"
I think the problem is, that whatever is proivded to the func() is treated as a column itself. thats why NULLIF is already framed in “”