hai provato a fare
SELECT * FROM chiamate_reportwhere status = 'NOTSERVED' and conversationTime > 30
hai provato a fare
SELECT * FROM chiamate_reportwhere status = 'NOTSERVED' and conversationTime > 30
Allora adesso vedo che il risultato è corretto e che infatti conta le chiamate not served con tempo < 30 secondi.
Il problema adesso è sul calcolo delle percentuali che mi dà sempre il 0%.
Il codice è questo:
E' corretta?codice:ifnull((count(case when status = 'NOTSERVED' and conversationTime > 30 then uniqueId else null end)/count(case when status = 'NOT SERVED' then uniqueId else null end)*100),0) as '% chiamate non servite superiore a 30 secondi',