Exercise · SQL & Querying
Predict, then run it
Predict the output
r(hits, views) = (3,7),(4,7). The flatten-success rate — cast one side so it survives a Postgres port:
SELECT 1.0 * SUM(hits) / SUM(views) AS rate FROM r;
Predict the exact output.
r(hits, views) = (3,7),(4,7). The flatten-success rate — cast one side so it survives a Postgres port:
SELECT 1.0 * SUM(hits) / SUM(views) AS rate FROM r;
Predict the exact output.