The first thing I do when analyzing a SQL table

Here's one of the first things I do with SQL when I want to quickly assess the data quality in a table.
I would run a series of quick COUNTs, testing key attributes of the data, such as key columns being NULL, which can display the distribution of problematic data so it can be processed accordingly.
A good way to ensure data quality in a data pipeline is to have a good look at it in the first place.

SELECT
is_paid IS NULL AS is_paid_null,
product_id IS NULL AS product_id_null,
COUNT(1) AS occurences
FROM input_data
GROUP BY ALL

Enjoyed this? Here are some related articles you might find useful: