SELECT
COUNT(*) AS total,
SUM(IF(`text` <> '', 1, 0)) AS non_empty
FROM `table`;Das liefert die Gesamtanzahl und die Anzahl der Zeilen, in denen text nicht leer ist.
SELECT
COUNT(*) AS total,
SUM(IF(`text` <> '', 1, 0)) AS non_empty
FROM `table`;Das liefert die Gesamtanzahl und die Anzahl der Zeilen, in denen text nicht leer ist.