Week 4 – Performing data calculations – Shuffle Q/A 3

31. A data analyst is trying to manually recalculate a column that was present in their dataset. They want to find rows where the values in their column do not match the values in the original column. Which of the following SQL clauses could they use?

  • WHERE original_column !! recalcualted_column
  • WHERE original_column NOT EQUALS recalcualted_column
  • WHERE original_column <> recalcualted_column
  • WHERE original_column ~= recalcualted_column

32. When working with a new dataset, how can you ensure that your data is valid?

  • Personally collect all data that you use in your analysis.
  • Manually check the calculations of calculated columns.
  • Convert all data to JavaScript Object Notation (JSON).
  • Fill in missing values with values that will favor your initial hypothesis.

33. Which of the following statements about temporary tables is correct?

  • They must be created using the WITH AS SQL clause.
  • They must be created using the WITH AS SQL clause.
  • They are declared by enclosing a FROM statement between ##.
  • They are a special feature of BigQuery unavailable in other RDBMS.

34. A data analyst wants to calculate the number of rows that have a value less than 150. Which function could they use?

  • =COUNTIF(”<150”,G2:G30)
  • =SUMIF(“<150”,G2:G30)
  • =COUNTIF(G2:G30,”<150”)
  • =SUMIF(G2:G30,“<150”)

35. What is the purpose of the EXTRACT function in SQL?

  • Calculate using data extracted from other tables
  • Return a specific key-value pair from a JSON object
  • Return a specific portion of a date
  • Calculate the mathematical extract operation

36. Which portion of a pivot table do you change if you want to use a different calculation to combine the results?

  • Filter
  • Columns
  • Values
  • Rows

37. Which of the following statements about temporary tables is correct?

  • They must be created using the WITH AS SQL clause.
  • They are automatically deleted when the SQL database session ends.
  • They are declared by enclosing a FROM statement between ##.
  • They are a special feature of BigQuery unavailable in other RDBMS.

38. Which of the following SQL queries adds a table into the database? Select all that apply.

  • CREATE TABLE my_table AS (SELECT * FROM other_table);
  • WITH my_table AS (SELECT * FROM other_table WHERE x = 0);
  • SELECT * FROM table;
  • SELECT * FROM table GROUP BY columnA ORDER BY columnB;

39. Which of the following SQL statements correctly implements a WITH AS clause?

  • WITH my_table AS (SELECT * FROM other_table);
  • WITH AS my_table AS (SELECT * FROM other_table);
  • WITH AS my_table AS SELECT * FROM other_table;
  • WITH my_table AS SELECT * FROM other_table;

Devendra Kumar

Project Management Apprentice at Google

Leave a Reply