Link: SQL

COUNT

COUNT(...)

-- check how big the dataset is
SELECT COUNT(*) FROM product_spend;

COUNT DISTINCT

COUNT(DISTINCT x): a bit different compare to SELECT DISTINCT in SQL SELECT

SELECT category, COUNT(DISTINCT user_id) FROM trades
GROUP BY category

SUM

SUM(...)

SELECT COUNT(drug), SUM(total_sales) FROM pharmacy_sales
WHERE manufacturer = 'Pfizer';

AVG

AVG(...)

MIN

MIN(...)

MAX

MAX(...)