Data & analysis
6 decisions a prompt of this kind should make on purpose, and 6 things worth leaving out.
sql, query, database, table, dataset, csv, spreadsheet, excel, pivot, analyze, analysis, data, join, aggregate, group by, trend, metric, kpi, cohort, segment, bigquery, snowflake, postgres, dataframe, vlookup, formula
- +Schema / data shapeAsk for column names + types (or a CREATE TABLE / first rows) and state what one row represents before writing anything.
- +Precise analytical questionRestate the vague ask as one measurable question: '[metric] by [dimension] over [window], vs [baseline]'.
- +Dialect / tool & engineDefault to standard ANSI SQL (or pandas for files) and state it; ask the warehouse if date/window functions are involved.
- +Filters, window & grainState explicit filters (exclude nulls/test/internal), a concrete window, and the rollup grain; surface these as assumptions.
- +Edge-case & null handlingHandle NULLs explicitly, guard divide-by-zero, de-dupe on the key; note how each was handled.
- +Output shapeProvide the query/formula, a sample of the expected result columns, and a one-line read of what the numbers mean.
Left out for this type: role ('SQL wizard'); 'professional and friendly' tone; vague 'concise and well-structured'; 'make it efficient' with no schema/size/index info; 'be accurate'/'double-check' padding; over-specifying chart styling (a separate viz task)