What will you do if your internal customer wants something unrealistic (for example, due to lack of data)?
Data Analyst
Behavioral question: how do you work with new, unfamiliar information (for example, a large array of articles)?
What will change if you replace COUNT(*) with COUNT() without an argument?
How do you rate yourself in terms of understanding the business on a five-point scale?
The monitoring model started flagging normal transactions as suspicious (false positives). What will you do?
Which query will be faster: with WHERE or with HAVING?
What is the difference between ORDER BY and PRIMARY KEY in ClickHouse, and why are they separated?.
If the North Star metric (number of successful orders) decreases — what to do?
Tell about the process of a business analyst in your team and your experience.
What types of DBMS do you know?
How do you decide which tests to write for a DBT model? Are alerts needed?
Tell us about the evolution of the BI tools used — starting with Power BI, and what came next?
What data sources have you integrated? What was it?
// We have a table with a product that has a view counter // table goods: // ID | cnt_view // ----------- // 1 | 100 // 2 users started viewing the product with id = 1 simultaneously // and we have two parallel transactions in the database // what will be the result? postgress func IncrementView(ctx context.Context, db *sql.DB, id int64) error { tx, err := db.BeginTx(ctx, nil) if err != nil { return err } defer tx.Rollback() var cnt int err = tx.QueryRowContext(ctx, "SELECT cnt_view FROM goods WHERE id = $1", id, ).Scan(&cnt) if err != nil { return err } cnt++ _, err = tx.ExecContext(ctx, "UPDATE goods SET cnt_view = $1 WHERE id = $2", cnt, id, ) if err != nil { return err } return tx.Commit() }
Tables product (information about the category to which the product belongs within a date range) and sale (sales facts with date, unit price, and quantity): select * from product |prod_nm |prod_cat |eff_dt |exp_dt | |--------|---------|-----------|-----------| |Product 1|Category 1|[phone]|[phone]| |Product 1|Category 2|[phone]|[phone]| |Product 2|Category 3|[phone]|[phone]| select * from sale |sale_dt |prod_nm |price|cnt| |----------|---------|-----|---| |[phone]|Product 1|10 |5 | |[phone]|Product 1|15 |2 | |[phone]|Product 4|15 |2 | |[phone]|Product 3|15 |2 | |[phone]|Product 2|10.9 |300| |[phone]|Product 1|12.7 |7 | Write a query that returns total revenue per category: |prod_cat |total_amt| |----------|---------| |Category 1|80 | |Category 2|84 | |Category 3|270 |
Have you worked with Git?
What do you generally like about the work of a data analyst? If you were to sell this profession, what would you say?
What is the difference between WHERE and HAVING?
Tell us about your data processing tools. What do you work with (SQL, Python)?
val_a, val_b = 0, 0 t = None while i < len(a) or j < len(b): a_next = a[i][0] if i < len(a) else float('inf') b_next = b[j][0] if j < len(b) else float('inf') if a_next < b_next: val_a = a[i][1] t = a[i][0] i += 1 elif b_next < a_next: val_b = b[j][1] t = b[j][0] j += 1 else: val_a = a[i][1] val_b = b[j][1] t = a[i][0] i += 1 j += 1 result.append((t, val_a + val_b)) return result