Draft a repeatable customer churn comparison query from raw tables

A definition sheet, a churn comparison query, count-check queries and a caveat list, with no results produced.

Choose one of three approaches. The steps for that option appear below.

Choose an option above. On a phone, swipe the tabs left or right to see all options →

GitHub Copilot: proposes churn definitions and SQL

GitHub Copilot proposes definitions and SQL text; you sign business choices and check joins without executing anything.

  1. You

    Collect schema and unresolved churn

  2. GitHub Copilot

    Draft query text in Ask

  3. You

    Check joins

  1. Collect schema and unresolved churn choices

    Use: You

    Have ready: table definitions, key relationships, business question, churn-window policy and SQL dialect; record missing cutoffs.

  2. Draft query text in Ask mode

    Use: GitHub Copilot

    Open only the schema in VS Code; use GitHub Copilot Ask mode for definitions, comparison SQL, count checks and caveats; copy locally.

    Details

    What to paste into the tool

    Task: Churn schema packet with keys, dialect and unresolved business choices; Proposed churn terms, comparison SQL, count-check SQL and caveats. Use the supplied keys and dialect; identify missing cutoffs as questions; draft churn-window and tenure definitions, a comparison query, and count checks requiring churned plus retained to equal the customer count; state association only and give no computed values; preserve the input packet alongside the draft

  3. Check joins and sign the definitions

    Use: You

    Trace joins to declared keys; sign churn window and tenure bands, check nulls and duplicates, edit SQL without running it.

    Check

    The churn analyst releases the response only to local SQL review. The churn analyst releases the query package only after signing its definitions. No computed table or results are produced here. Keep the caveats. Add a note to run the query later on a copy and to hand-count 20 customers outside this workflow. Edit all query text without running it.

Before you paste into any AI tool, remove any confidential information. Put it back at the end.

Tools in this workflow

Deciding between Cursor and GitHub Copilot for this? See the comparison.

Final check

Keep definitions signed and leave query execution and computed results outside this draft workflow.

Check the result against your original inputs. Approve it before sharing or acting.

What still needs checking
  • Account access, applicable plan allowance and organisational permission for each contemplated disclosure require confirmation before use

Share this page