I've been using this simple query as a way to find data when I'm working on new queries for my coworkers. Is it possible to upgrade it to return a 4th and 5th column that reports how many rows are in the Table and how many NULL values are in the column? That would save me so much time during my exploration.
SELECT
TABLE_SCHEMA AS 'SchemaName'
,TABLE_NAME AS 'TableName'
,COLUMN_NAME AS 'ColumnName'
FROM INFORMATION_SCHEMA.COLUMNS
WHERE COLUMN_NAME LIKE '%cost%'
AND TABLE_SCHEMA = 'dbo'
ORDER BY TableName, ColumnName;