I have a table with a column that allows null. If null, it is incomplete. I want to calculate the percentage of completion.
Is it possible to do this in MySQL via SQL, or should I get the total records and total zero records and calculate the percentage on the server?
In any case, I am very confused about how I need to separate the value_value so that I can get its final results, as well as its final NULL results.
SELECT
games.id
FROM
games
WHERE
games.category_id='10' AND games.variable_value IS NULL
This gives me all games where variable_value is NULL. How do I extend this to also get me either TOTAL games or NOT NULL games with it?
Table layout:
id (INT Primary Auto-Inc)
category_id (INT)
variable_value (TEXT Allow Null Default: NULL)