Data Analyst Interview Questions for International Students: SQL, Case Rounds and the Visa Question

Twelve SQL prompts, a metric-drop case, a dashboard critique and an honest way to answer the sponsorship question when you are on OPT or STEM OPT.

By F1Jobs Team · 2026-11-01 · 11 min read
A long communal table in a sunlit coworking space at noon with closed notebooks, a small desk plant and coffee cups under bright diffused skylight

The data analyst interview questions you will face fall into five groups: SQL (joins, aggregation, window functions and a cohort retention query), spreadsheet and statistics basics, a business case that often opens with "this metric dropped, why?", a dashboard or BI critique, and behavioral questions. On F-1 OPT or STEM OPT there is a sixth: the sponsorship question. For analyst titles the honest answer rests on your degree field and the job's real duties. Your degree's CIP code decides STEM OPT eligibility, and the duties shape any later H-1B petition.

Status as of November 1, 2026. STEM OPT still requires an E-Verify employer and a signed Form I-983, and timely filers keep the 180-day automatic extension (in effect). OPT fees that schools would pay are only proposed (comments close 2026-11-09; closing them does not make the rule final). Proclamation 11069's $100,000 H-1B payment is in effect on paper but not collected: courts blocked the policies that implement it, on appeal.

What do data analyst interview questions test?

A data analyst interview loop tests whether you can pull correct numbers with SQL, explain what they mean for a business decision, and say both clearly. Most loops run a recruiter screen, a live SQL round, a case or metric investigation, a dashboard or take-home review, and a behavioral round. Your reasoning out loud is scored as much as your answers.

Why does the bar feel higher this year?

Junior seats are scarcer. Indeed Hiring Lab found entry-level postings down 7.5% and senior postings up 14.7% year over year in its May 2026 data, and Lightcast's October 19, 2026 update counted about one junior role per four senior roles, against one per 2.5 in 2022. Both measure all postings, not analyst roles alone. Your clock matters too: post-completion OPT allows 90 days of unemployment, and STEM OPT 150 in total, OPT days included, per the SEVIS Help Hub unemployment counter.

SQL interview questions for data analysts: 12 prompts

These SQL coding interview questions use one schema: users(user_id, signup_date, country, platform), orders(order_id, user_id, order_date, amount, status), order_items(order_id, product_id, category, revenue) and events(user_id, event_date, event_name). Name your dialect first; PostgreSQL, BigQuery and Snowflake handle dates differently.

Joins and aggregation

  1. Completed revenue by country for October 2026, including countries with no orders. LEFT JOIN plus COALESCE. Trap: status = 'completed' in the WHERE clause turns the LEFT JOIN into an inner join; put it in the ON clause.
  2. Users who signed up but never ordered. NOT EXISTS, or LEFT JOIN with WHERE o.order_id IS NULL. NOT IN returns nothing if the subquery holds a NULL.
  3. Users who spent more than $500 on completed orders. WHERE filters rows before grouping; HAVING filters groups after.
  4. "Revenue doubled after I joined orders to events. Why?" Join fan-out. Aggregate each table to the user level first and compare row counts.

Window functions

  1. Each user's first order. ROW_NUMBER() OVER (PARTITION BY user_id ORDER BY order_date, order_id) = 1; the second key breaks ties.
  2. Daily revenue with a month-to-date running total. Aggregate to one row per day, then SUM(daily_revenue) OVER (PARTITION BY DATE_TRUNC('month', day) ORDER BY day ROWS BETWEEN UNBOUNDED PRECEDING AND CURRENT ROW). Without the PARTITION BY the total never resets each month.
  3. Week-over-week change in orders. Aggregate to weeks, then LAG, with NULLIF on the denominator.
  4. Top three products per category. Justify ROW_NUMBER, RANK or DENSE_RANK; ties are the question.
  5. Seven-day rolling average of daily active users. Count distinct users per day, build a date spine so missing days count as zero, then ROWS BETWEEN 6 PRECEDING AND CURRENT ROW.

Cohorts and retention

  1. Monthly signup cohorts with month-N retention. Learn to write this cold. In PostgreSQL:
WITH cohorts AS (
  SELECT user_id, DATE_TRUNC('month', signup_date) AS cohort_month
  FROM users
),
sizes AS (
  SELECT cohort_month, COUNT(*) AS cohort_size
  FROM cohorts
  GROUP BY cohort_month
),
activity AS (
  SELECT DISTINCT user_id, DATE_TRUNC('month', event_date) AS active_month
  FROM events
)
SELECT
  c.cohort_month,
  (EXTRACT(YEAR FROM a.active_month) - EXTRACT(YEAR FROM c.cohort_month)) * 12
    + (EXTRACT(MONTH FROM a.active_month) - EXTRACT(MONTH FROM c.cohort_month)) AS month_n,
  COUNT(DISTINCT a.user_id) AS retained_users,
  ROUND(100.0 * COUNT(DISTINCT a.user_id) / s.cohort_size, 1) AS pct_retained
FROM cohorts c
JOIN activity a ON a.user_id = c.user_id AND a.active_month >= c.cohort_month
JOIN sizes s ON s.cohort_month = c.cohort_month
GROUP BY c.cohort_month, month_n, s.cohort_size
ORDER BY c.cohort_month, month_n;
  1. "What is our day-7 retention?" Define it first: active on exactly day 7, on any of days 1 to 7, or during days 7 to 13? Which time zone starts a "day"? The definition is part of the answer.
  2. Longest streak of consecutive active days. Gaps and islands: one row per user per day, subtract ROW_NUMBER (as days) from the date, and each streak shares a group key. Count per group, take the maximum.

How are SQL rounds scored?

Correct output is the floor; narration separates candidates. State assumptions (NULLs, duplicates, ties, time zones) and sanity-check row counts; in a second language, a one-line spoken plan buys time. Our data engineering interview prep on SQL and ETL pipelines goes deeper on optimization.

How do I answer a data analyst case study question?

Clarify the metric, rule out data problems, check the calendar, then break the metric into drivers and segment until you find where the change lives. Finish with a testable hypothesis and a recommendation. Interviewers grade structure and judgment, not whether you guess the cause.

Worked example: weekly orders fell 8%. What happened?

For a food-delivery app, a strong answer runs like this:

  1. Clarify. Orders placed or delivered? Versus last week or the same week last year? Is 8% outside normal noise?
  2. Rule out the data. A tracking change, app release, pipeline delay or dashboard filter? A one-day cliff points to instrumentation; a gradual slide points to demand.
  3. Check the calendar. Holidays, weather, an ended promotion, a competitor launch.
  4. Decompose. Orders = active users × share who order × orders per ordering user. Which factor moved?
  5. Segment. Platform, region, new versus returning, channel, restaurant supply, until the drop is localized.
  6. Test a hypothesis. "If the drop is only on Android since Tuesday's release, checkout-to-payment conversion by app version will show it." Name the query.
  7. Recommend. Roll back or hotfix, size the lost orders, and name the metric that confirms recovery.

Signpost before you start ("first whether it's real, then where, then why"); a structured answer is easy to follow, whatever your accent.

How do I handle the dashboard and BI round?

Some loops show you a dashboard and ask what you would change. Start with who uses it and what decision it supports; every other critique follows.

What you noticeWhy it mattersWhat you would propose
No stated audience or decisionNo chart can be judged without oneAsk who opens it weekly and what they decide
A dozen KPI tiles, no comparisonA number without context is noiseChange against prior period or target
Pie chart with many slicesAngles are hard to compareA sorted bar chart
Truncated or dual y-axesExaggerates or hides changeBars from zero; split the series
No metric definitions or refresh timeTeams compute "active" differently; stale data reads as currentDefinitions tooltip; "data through" timestamp

Close by naming the two changes you would make first. Tool questions often follow. In Power BI, when is a measure better than a calculated column? (A measure computes at query time in the current filter context, so it responds to slicers; a column is computed at refresh and stored per row.) In Tableau, what does a FIXED level-of-detail expression do? (It aggregates at the dimensions you name, not the ones in the view.) And how would you speed up a slow dashboard? Pre-aggregate in SQL, cut visuals and push filters to the source.

Excel, statistics and behavioral interview questions for data analysts

Spreadsheets: XLOOKUP or INDEX-MATCH, SUMIFS, pivot tables, cleaning mixed date formats. Statistics: mean versus median for skewed revenue, what a p-value does not tell you, why peeking at an A/B test inflates false positives, Simpson's paradox, correlation versus causation.

Behavioral questions usually include: a time your analysis was wrong; a stakeholder who disputed your numbers; an ambiguous request you scoped; explaining a finding to non-technical people; a decision your analysis changed. Home-country, campus and internship experience all count; describe it at its real scale. See our STAR answers for non-native English speakers for 90-to-120-second stories, and the take-home assignment interview guide for take-home analyses.

How to answer the sponsorship question as a data analyst on OPT

"Will you now or in the future require sponsorship?"

Answer truthfully, with dates. If you will need H-1B later, the answer to "in the future" is yes. For example: "I'm on F-1 OPT through March 31, 2027, and my degree qualifies for the 24-month STEM OPT extension with an E-Verify employer. For longer-term employment I would need H-1B sponsorship." Use your own dates, and mention STEM OPT only if your DSO has confirmed your degree qualifies. More phrasings: answering "do you need sponsorship?".

Why do data analyst H-1B petitions get RFEs?

USCIS does not publish RFE reasons by job title, so look at the test. The USCIS H-1B specialty occupations page (updated 09/21/2026) requires "a bachelor's or higher degree in a directly related specific specialty" and points to 8 CFR 214.2(h)(4)(iii)(A) for the four ways a job can meet it. "Data analyst" spans routine report pulls to statistical modeling, so the title settles nothing; an officer can ask whether these duties normally require a degree in a specific, directly related field.

For scale, USCIS's I-129 quarterly data show that 8.5% of H-1B petitions completed in FY2026 Q1 to Q3 (initial and extension filings together) had an RFE, and 97.0% were approved (approvals over approvals plus denials). That data predates PA-2026-05 (in effect since 2026-08-05, challenged), which lets officers deny any USCIS benefit request, a STEM OPT I-765 included, without an RFE when required initial evidence is missing.

In the interview, describe your work as it really is (what you queried, modeled and decided) and never inflate it. The job description, Labor Condition Application and petition belong to the employer and its immigration attorney, and must match the real job. Sponsorship routes are in our data analyst H-1B sponsorship guide.

Do data analyst jobs sponsor H-1B?

Some do and many do not. Look a company up in the USCIS H-1B Employer Data Hub (on 2026-11-01 it said it covers fiscal years 2009 through 2026, quarter 4) and check its initial approvals, then search DOL's OFLC disclosure data (latest LCA file FY2026 Q3), which lists job titles and wages. Cap selection has been wage-weighted since 2026-02-27 (in effect): four entries at Level IV down to one at Level I, so an offer at the Level I wage gets one entry. Weighing consulting offers? Our Big Four versus boutique data analyst comparison covers how each sponsors.

Is a data analyst role eligible for STEM OPT?

Your degree decides, not your title. Under 8 CFR 214.2(f)(10)(ii)(C)(2), as quoted on the DHS STEM Designated Degree Program List (last updated July 22, 2024), a STEM field is one in the CIP taxonomy "within the two-digit series containing engineering, biological sciences, mathematics, and physical sciences, or a related field." The list includes 30.7101 Data Analytics, General; 30.7102 Business Analytics; 30.7001 Data Science, General; 27.0501 Statistics, General; 52.1301 Management Science; and 11.0802 Data Modeling/Warehousing and Database Administration. No 52.12 Management Information Systems code is on it. What counts is the CIP code your school assigned to your major, shown on your Form I-20; your DSO can confirm it.

On the employer side, the USCIS STEM OPT page says the employer must "be enrolled in E-Verify" and "have and maintain a bona fide employer-employee relationship" with you, and the I-983 must show "the direct relationship between the STEM OPT opportunity" and your degree.

Misconception: "Analyst isn't engineering, so it can't be STEM OPT." Correction: STEM OPT follows the degree's CIP code and the job's link to it. A business-analytics graduate in an analytics role may qualify; a statistics graduate in an unrelated role may not. Your DSO decides the recommendation.

What you may hear from employers, and the rule as of 2026-11

Employer questions and the rule, as of 2026-11-01

What you may hearThe rule as of 2026-11-01Status
"Will you lose work authorization while STEM OPT is pending?"A timely STEM I-765 gets an automatic 180-day extension, unchanged by the 2026-10-14 EAD ruleIn effect
"Don't H-1Bs cost $100,000 now?"Proclamation 11069 runs to 2027-09-21, but courts vacated the agency policies that collect itIn effect on paper; fee blocked, on appeal
"Is there a new OPT fee?"$70,000 before the initial DSO recommendation, $30,000 before each later one, paid by the school (which may pass it on), from 60 days after any final ruleProposed; comments close 2026-11-09
"When is the next H-1B lottery?"FY2028 dates not announced; USCIS must give at least 30 days' noticeNot announced

The USCIS Form I-129 page (updated 2026-10-30) says that if the court order is lifted, "DHS still plans to collect the payment"; change-of-status petitions USCIS grants inside the US were never covered (a denied one could be). Lottery dates will appear on the H-1B registration page. OPT fee text: Federal Register proposal.

At the offer stage: confirm STEM OPT and E-Verify before you sign

  1. Ask HR for the company's E-Verify company ID (Form I-983 asks for it) and check the E-Verify Employer Search; a company may be listed under a trade name, and multi-site employers may enroll only some hiring sites.
  2. Compare the offer letter's duties with the job you interviewed for; Form I-983 must describe the real job, so raise any mismatch now.
  3. Draft Form I-983 with your future manager (training goals, supervision, link to your degree) and sign it together.
  4. Submit it to your DSO and request the STEM OPT recommendation in SEVIS. Study in the States says you must "download, complete, sign and submit" the I-983 to your DSO before applying to USCIS.
  5. File Form I-765 inside the USCIS window: no earlier than 90 days before your OPT EAD expires, within 60 days of the DSO's recommendation, and before the EAD ends. The fee is $520 on paper or $470 online (G-1055, edition 10/26/26). The processing-times tool showed 80% of F-1 student I-765s done within 5 months on 2026-11-01.
  6. Ask HR in writing whether it registers analysts in the H-1B lottery, and who its immigration counsel is.

Worked timeline. If your OPT EAD ends 2027-03-31, the filing window opens 2026-12-31. A DSO recommendation entered 2027-01-11 sets a 60-day limit of 2027-03-12 (a Friday), earlier than the EAD end, so that is the real deadline. A STEM I-765 filed after the EAD expires gets no 180-day extension. Confirm your dates with your DSO.

For December starts: E-Verify is funded through 2026-12-11 under the current continuing resolution and lapses with it unless Congress passes funding by then. In the 2025 shutdown it was offline from 2025-10-01 until about October 8-9.

Common mistakes

Frequently asked questions

What SQL questions are asked in data analyst interviews?

Expect joins and aggregation (LEFT JOIN, anti-joins, HAVING), window functions (ROW_NUMBER, RANK, LAG, running totals) and a cohort retention query. Interviewers also score whether you define terms such as "active user" first.

How do I answer a data analyst case study question?

Clarify the metric, rule out data problems, check the calendar, decompose the metric into drivers and segment until the change is localized, then close with a testable hypothesis and a recommendation.

Do data analyst jobs sponsor H-1B?

Some employers do and many do not, so check each one in the USCIS H-1B Employer Data Hub and DOL OFLC disclosure data. Duties and the degree requirement, not the title, decide whether a job qualifies. FY2028 registration is not announced (2026-11-01).

Is a data analyst role eligible for STEM OPT?

Eligibility follows your degree, not your title. Its CIP code must be on the DHS STEM list (30.7101 Data Analytics is on it), the employer must use E-Verify, and Form I-983 must tie the job to the degree. Your DSO confirms it.

Why do data analyst H-1B petitions get RFEs?

Analyst duties range from routine reporting to statistical modeling, so an officer may ask whether they need a degree in a directly related specialty. USCIS gives no title breakdown; 8.5% of H-1B petitions completed in FY2026 Q1 to Q3 had an RFE.

Sources

How we checked this: we read the government pages above on November 1, 2026, took the H-1B rates from the H-1B tab of USCIS's FY2026 Q3 I-129 file, and took the CIP codes from the DHS STEM list PDF last updated July 22, 2024.

This is general information, not legal or tax advice. Your own I-20, EAD and Form I-983 govern; take OPT and STEM OPT questions to your DSO, and H-1B petition questions to your employer's immigration attorney or your own.

If you are interviewing for analyst roles on OPT and want help finding employers that sponsor, F1Jobs can help you plan the search.

Frequently asked questions

What SQL questions are asked in data analyst interviews?

Expect joins and aggregation (LEFT JOIN, anti-joins, HAVING), window functions (ROW_NUMBER, RANK, LAG, running totals) and a cohort retention query. Interviewers also score whether you define terms such as active user first.

How do I answer a data analyst case study question?

Clarify the metric, rule out data problems, check the calendar, decompose the metric into drivers and segment until the change is localized, then close with a testable hypothesis and a recommendation.

Do data analyst jobs sponsor H-1B?

Some employers do and many do not, so check each one in the USCIS H-1B Employer Data Hub and DOL OFLC disclosure data. Duties and the degree requirement, not the title, decide whether a job qualifies. FY2028 registration is not announced (2026-11-01).

Is a data analyst role eligible for STEM OPT?

Eligibility follows your degree, not your title. Its CIP code must be on the DHS STEM list (30.7101 Data Analytics is on it), the employer must use E-Verify, and Form I-983 must tie the job to the degree. Your DSO confirms it.

Why do data analyst H-1B petitions get RFEs?

Analyst duties range from routine reporting to statistical modeling, so an officer may ask whether they need a degree in a directly related specialty. USCIS gives no title breakdown; 8.5% of H-1B petitions completed in FY2026 Q1 to Q3 had an RFE.