Font size
WorksheetsSQL Quiz
Total questions: 18
Worksheet time: 9mins
Query Optimization: What is the main reason to not use SELECT * to explore your dataset?
The BigQuery preview data table feature is faster and free to preview records
Selecting all columns is an expensive operation performance-wise, especially with no filters
Selecting all columns, even with WHERE clause filters, will scan your entire dataset and incur charges for all bytes processed.
All of the above
Data Duplication Checking: What is a common way in SQL to identify duplicate records?
Sort the records and look for multiple occurrences visually
Use an easy-to-go COUNT function
Use ranking functions (row_number, rank, dense_rank) to number the records in order of time
Check whether the tables we are going to perform joining have the one-to-many relationship
Query Optimization: What is NOT one of the best practices for cost optimizing your queries?
Avoid SELECTing all columns in your data, use only what you need
Use LIMIT queries with WHERE clause filters to limit the amount of data scanned
Filter your data as early as possible so you are not doing work on records that are later filtered out
None of answer above
Query Optimization: What is the better method to quickly and approximately check A30 from `USER_LOGIN_V2` table?
APPROX_COUNT_DISTINCT()
Just use COUNT(DISTINCT)
HyperLogLog++
The first and third answer
What is better way to get the latest or highest value record? For example: user_id has highest gmv in a month of OTA?
rank() over (partition by OTA order by gmv asc)
rank() over (partition by OTA order by gmv desc)
ARRAY_AGG(user_id order by gmv desc limit 1)[OFFSET(0)]
row_number() over (partition by OTA order by gmv desc)
A data analyst wants to retrieve only records from a database that have matching values in two different tables. Which JOIN function should they use?
LEFT JOIN
RIGHT JOIN
OUTER JOIN
INNER JOIN
You are working with a dataset with the column name “firstquarterexpenses.” How can you rename this column to make it more readable?
1st_quarter_expenses
fqe
first_quarter_expenses
first+quarter+expenses
You’re analyzing patient data for a healthcare company. During the data-validation process, you notice that the first date of service for some of the patients is later than the most recent date of service. Which type of data-validation check are you completing?
Data structure
Data consistency
Data type
Data range
During analysis, you complete a data-validation check for errors in customer identification (ID) numbers. Customer IDs must be eight characters and can contain numbers only. Which of the following customer ID errors will a data-type check help you identify?
IDs that are repeated
IDs in the wrong column
IDs with more than eight characters
IDs with text
Which of the action below could lead to data duplication?
A user register his bank account for the first time.
A user redeems 3 different vouchers in a day.
A user fills in a registration form of promotion 2 times.
A male user recognizes himself as female.
Which of the following items is NOT one of the consequences of duplication in data?
Leading to a flawless but costly business decisions.
Causing computational expensive queries.
Providing a dynamic view of user profile.
Eat up the storage space in the database.
What should be avoided for not being duplicated?
Ask the PIC of datasource regarding the granularity of the tables.
Join 2 tables with different level of detail without checking.
Review the number of records after joining in comparison to the original dataset.
Count the number of records of selected columns before joining.
In order to detect data duplication, what could we do?
Always remember to check the level of detail of the raw tables.
Read the technical documents to understand how data is tracked.
Select the distinct values of needed columns.
Select the least number of columns from the table with lower level of detail.
Ly unfortunately generates a triple-in-size dataset after merging 2 tables, what should she do?
Ask Huy to help her deduplicate the final table.
Revise the raw tables by counting the occurrences of selected columns.
Check the data schemas of the raw tables.
Use the DISTINCT while selecting needed columns in raw tables.
Why should we use the latest data while deduplicating?
Because the newer the data, the more accurate it is.
Since the data governance system always ingests the correct data periodically.
As we believe that the later records are self-corrected data.
Since the dynamic data will change over the time, thus the newer data are more accurate.
What is the capital of Canada?
Quebec
Ottawa
Vancouver
Toronto
Đà Nẵng có bao nhiêu ngôi chùa Linh Ứng?
1
2
3
4
"Da trắng vỗ bì bạch" là câu thơ của ai, để thử tài ai?
Đoàn Thị Điểm thử tài Trạng Tí
Xuân Quỳnh thử tài Lưu Quang Vũ
Hồ Xuân Hương thử tài Trạng Quỳnh
Đoàn Thị Điểm thử tài Trạng Quỳnh
