Library › Coding AI › Product managers

Count an October onboarding funnel in New York time

Practice: Giving the right context. About 5 minutes.

About this exercise

Write one SQL query for October 2026 that returns one row with three columns, signed_up, created_project and invited_teammate, each the number of distinct users with that event (count each step on its own). Our reports run on New York time, but created_at is stored in UTC, so convert it (AT TIME ZONE) before filtering October. Leave out internal users (is_internal = true). One code block, at most 15 lines, then under 25 words outside the code.

Common mistakes when you ask AI for this

  • Not mentioning the time zone. The AI filters on raw UTC times, so evening signups on the last day land in the wrong month. Try: Add: "created_at is UTC; convert to America/New_York before filtering."
  • Forgetting the staff accounts. The AI can't know internal users pad the numbers unless you say to drop them. Try: Add: "Exclude users where is_internal is true."
  • Leaving the output shape open. The AI returns one row per event name, or a long chain of CTEs, instead of the row you'll paste. Try: Add: "One row, columns signed_up, created_project, invited_teammate, distinct users."
  • Getting a menu of options. The AI likes to offer two or three versions of the query, so you're left to pick and test them yourself. Try: Add: "Give one query only, in one code block, no alternatives."
  • Getting a tutorial. By default the AI explains every part of the code at length, which you then have to scroll past. Try: Add: "After the code, one line under 15 words. Nothing else."

What a strong prompt includes

  • Handles the time zone
  • Drops internal accounts
  • Asks for distinct users
  • Shows the output columns
  • Asks for one answer only

Practice this now ↑

Related exercises