Data Analyst Interview Questions and Answers
Data Analyst Interview Questions and Answers
Data Analyst Interview Questions and Answers
and Answers
Written by Coursera • Updated on Apr 5, 2022
Share
Walk into your data analyst interview with confidence by preparing with these 15 interview
questions.
If you’re like many people, the job interview can be one of the most
intimidating parts of the job search process. But it doesn’t have to be. With a
bit of advanced preparation, you can walk into your data analyst interview
feeling calm and confident.
In this article, we’ll go over some of the most common interview questions
you’re likely to encounter as you apply for an entry-level data analyst
position. We’ll walk through what the interviewer is looking for and how best
to answer each question. Finally, we’ll cover some tips and best practices for
interviewing success. Let’s get started.
This question can sound broad and open ended, but it’s really about your
relationship with data analytics. Keep your answer focused on your journey
toward becoming a data analyst. What sparked your interest in the field?
What data analyst skills do you bring from previous jobs or coursework?
If you’re applying for a job as a data analyst, you likely know the basics
of what data analysts do. Go beyond a simple dictionary definition to
demonstrate your understanding of the role and its importance.
Outline the main tasks of a data analyst: identify, collect, clean, analyze, and
interpret. Talk about how these tasks can lead to better business decisions,
and be ready to explain the value of data-driven decision making.
When an interviewer asks you this type of question, they’re often looking to
evaluate your strengths and weaknesses as a data analyst. How do you
overcome challenges, and how do you measure the success of a data
project?
If you get asked the negative version of the question (least successful or
most challenging project), be honest as you focus your answer on lessons
learned. Identify what went wrong—maybe your data was incomplete or your
sample size was too small—and talk about what you’d do differently in the
future to correct the error. We’re human, and mistakes are a part of life.
What’s important here is your ability to learn from them.
Many businesses have more data at their disposal than ever before. Hiring
managers want to know that you can work with large, complex data sets.
Focus your answer on the size and type of data. How many entries and
variables did you work with? What types of data were in the set?
The experience you highlight doesn't have to come from a job. You’ll often
have the chance to work with data sets of varying sizes and types as a part
of a data analysis course, bootcamp, certificate program, or degree. As you
put together a portfolio, you may also complete some independent projects
where you find and analyze a data set. All of this is valid material to build
your answer.
The purpose here is to evaluate your ability to problem solve and your
overall comfort working with numbers. Since this is about how you think,
think out loud as you work through your answer.
What types of data would you need?
Where might you find that data?
Once you have the data, how would you use it to calculate an estimate?
In your answer, give a short description of what data cleaning is and why it’s
important to the overall process. Then walk through the steps you typically
take to clean a data set. Consider mentioning how you handle:
Missing data
Duplicate data
Data from different sources
Structural errors
Outliers
While the ability to draw insights from data is a critical skill for a data analyst,
being able to communicate those insights to stakeholders, management,
and non-technical co-workers is just as important.
Your answer should include the types of audiences you’ve presented to in
the past (size, background, context). If you don’t have a lot of experience
presenting, you can still talk about how you’d present data findings
differently depending on the audience.
Effective data analysts let the data tell the story. After all, data-driven
decisions are based on the facts rather than intuition or gut feelings. When
asking this question, an interviewer might be trying to determine:
How you validate results to ensure accuracy
How you overcome selection bias
If you’re able to find new business opportunities in surprising results
Be sure to describe the situation that surprised you, as well as what you
learned from it. This is your opportunity to demonstrate your natural curiosity
and excitement to learn new things from data.
Show that you can be business-minded by tying this back to the business.
How would this analysis bring value to the company?
This is a good time to revisit the job listing to look for any software
emphasized in the description. As you answer, explain how you’ve used that
software (or something similar) in the past. Show your familiarity with the tool
by using associated terminology.
Mention software solutions you’ve used for various stages of the data
analysis process. You don’t need to go into great detail here. What you used
and what you used it for should suffice.
Most entry-level data analyst roles will require at least a basic competency in
statistics, as well as an understanding of how statistical analysis ties into
business goals. List the types of statistical calculations you’ve used in the
past and what business insights those calculations yielded.
13. How have you used Excel for data analysis in the
past?
Spreadsheets rank among the most common tools used by data analysts.
It’s common for interviews to include one or more questions meant to gauge
your skill working with data in Microsoft Excel.
Five Excel interview questions for data analysts
Here are five more questions specific to Excel that you might be asked during your interview:
1. What is a VLOOKUP, and what are its limitations?
2. What is a pivot table, and how do you make one?
3. How do you find and remove duplicate data?
4. What are INDEX and MATCH functions, and how do they work together?
5. What’s the difference between a function and a formula?
Need a quick refresher before your interview? Get a hands-on walkthrough
of important functions and techniques in under 90 minutes with the Problem
Solving Using Microsoft Excel.
Mining is performed on clean and well- The analysis of data involves Data Cleaning. So, data
documented data. is not present in a well-documented format.
Results extracted from data mining are not easy Results extracted from data analysis are easy to
to interpret. interpret.
So, if you have to summarize, Data Mining is often used to identify patterns in the
data stored. It is mostly used for Machine Learning, and analysts have to just
recognize the patterns with the help of algorithms. Whereas, Data Analysis is used to
gather insights from raw data, which has to be cleaned and organized before
performing the analysis.
Collect Data: The data gets collected from various sources and is stored so that it
can be cleaned and prepared. In this step, all the missing values and outliers are
removed.
Analyse Data: Once the data is ready, the next step is to analyze the data. A model
is run repeatedly for improvements. Then, the mode is validated to check whether it
meets the business requirements.
Create Reports: Finally, the model is implemented and then reports thus generated
are passed onto the stakeholders.
Data Mining: Data Mining refers to the analysis of data with respect to finding
relations that have not been discovered earlier. It mainly focuses on the detection of
unusual records, dependencies and cluster analysis.
Q4. What is data cleansing and what are the best ways to practice
data cleansing?
Data Cleansing or Wrangling or Data Cleaning. All mean the same thing. It is the
process of identifying and removing errors to enhance the quality of data. You can
refer to the below image to know the various ways to deal with missing data.
Fig 2: Ways of Data Cleansing – Data Analyst Interview Questions
As the name suggests Data Validation is the process of validating data. This step
mainly has two processes involved in it. These are Data Screening and Data
Verification.
Data Screening: Different kinds of algorithms are used in this step to screen the
entire data to find out any inaccurate values.
Data Verification: Each and every suspected value is evaluated on various use-
cases, and then a final decision is taken on whether the value has to be included in
the data or not.
Q6. What do you think are the criteria to say whether a developed data
model is good or not?
Well, the answer to this question may vary from person to person. But below are a
few criteria which I think are a must to be considered to decide whether a developed
data model is good or not:
A model developed for the dataset should have predictable performance. This is
required to predict the future.
A model is said to be a good model if it can easily adapt to changes according to
business requirements.
If the data gets changed, the model should be able to scale according to the data.
The model developed should also be able to easily consumed by the clients for
actionable and profitable results.
Q8. Can you mention a few problems that data analyst usually
encounter while performing the analysis?
The following are a few problems that are usually encountered while performing data
analysis.
This method is used to impute the missing attribute values which are imputed by the
attribute values that are most similar to the attribute whose values are missing. The
similarity of the two attributes is determined by using the distance functions.
The complete Hadoop Ecosystem was developed for processing large dataset for an
application in a distributed computing environment. The Hadoop Ecosystem consists
of the following Hadoop components.
Now, moving on to the next set of questions, which is the Excel Interview Questions.
Data Analyst Interview Questions:
Excel
Microsoft Excel is one of the simplest and most powerful software applications
available out there. It lets users do quantitative analysis, statistical analysis with an
intuitive interface for data manipulation, so much so that its usage spans across
different domains and professional requirements. This is an important field that gives
a head-start for becoming a Data Analyst. So, now let us quickly discuss the
questions asked with respect to this topic.
Q1. Can you tell what is a waterfall chart and when do we use it?
The waterfall chart shows both positive and negative values which lead to the final
result value. For example, if you are analyzing a company’s net income, then you
can have all the cost values in this chart. With such kind of a chart, you can visually,
see how the value from revenue to the net income is obtained when all the costs are
deducted.
Q2. How can you highlight cells with negative values in Excel?
You can highlight cells with negative values in Excel by using the conditional
formatting. Below are the steps that you can follow:
Select the cells which you want to highlight with the negative values.
Go to the Home tab and click on the Conditional Formatting option
Go to the Highlight Cell Rules and click on the Less Than option.
In the dialog box of Less Than, specify the value as 0.
Fig 3: Snapshot of Highlighting cells in Excel – Data Analyst Interview Questions
Q3. How can you clear all the formatting without actually removing the cell
contents?
Sometimes you may want to remove all the formatting and just want to have the
basic/simple data. To do this, you can use the ‘Clear Formats’ options found in the
Home Tab. You can evidently see the option when you click on the ‘Clear’ drop
down.
Fig 4: Snapshot of clearing all formatting in Excel – Data Analyst Interview
Questions
Q4. What is a Pivot Table, and what are the different sections of a Pivot
Table?
A Pivot Table is a simple feature in Microsoft Excel which allows you to quickly
summarize huge datasets. It is really easy to use as it requires dragging and
dropping rows/columns headers to create reports.
Yes, we can create one Pivot Table from multiple different tables when there is a
connection between these tables.
If you wish to select all the blank cells in Excel, then you can use the Go To Special
Dialog Box in Excel. Below are the steps that you can follow to select all the blank
cells in Excel.
First, select the entire dataset and press F5. This will open a Go To Dialog Box.
Click the ‘Special‘ button which will open a Go To special Dialog box.
After that, select the Blanks and click on OK.
The final step will select all the blank cells in your dataset.
Q7. What are the most common questions you should ask a client before
creating a dashboard?
Well, the answer to this question varies on a case-to-case basis. But, here are a few
common questions that you can ask while creating a dashboard in Excel.
Q8. What is a Print Area and how can you set it in Excel?
A Print Area in Excel is a range of cells that you designate to print whenever you
print that worksheet. For example, if you just want to print the first 20 rows from the
entire worksheet, then you can set the first 20 rows as the Print Area.
Now, to set the Print Area in Excel, you can follow the below steps:
Select the cells for which you want to set the Print Area.
Then, click on the Page Layout Tab.
Click on Print Area.
Click on Set Print Area.
Q9. What steps can you take to handle slow Excel workbooks?
Well, there are various ways to handle slow Excel workbooks. But, here are a few
ways in which you can handle workbooks.
Multiple sorting refers to the sorting of a column and then sorting the other column by
keeping the first column intact. In Excel, you can definitely sort multiple columns at a
one time.
To do multiple sorting, you need to use the Sort Dialog Box. Now, to get this, you
can select the data that you want to sort and then click on the Data Tab. After that,
click on the Sort icon.
In this Dialog box, you can specify the details for one column, and then sort to
another column, by clicking on the Add Level button.
Moving onto the next set of questions, which is questions asked related to Statistics.
This is one of the most important and widely used distributions in statistics.
Commonly known as the Bell Curve or Gaussian curve, normal distributions,
measure how much values can differ in their means and in their standard deviations.
Refer to the below image.
Fig 5: Normal Distribution – Data Analyst Interview Questions
As you can see in the above image, data is usually distributed around a central value
without any bias to the left or right side. Also, the random variables are distributed in
the form of a symmetrical bell-shaped curve.
A/B testing is the statistical hypothesis testing for a randomized experiment with two
variables A and B. Also known as the split testing, it is an analytical method that
estimates population parameters based on sample statistics. This test compares two
web pages by showing two variants A and B, to a similar number of visitors, and the
variant which gives better conversion rate wins.
The goal of A/B Testing is to identify if there are any changes to the web page. For
example, if you have a banner ad on which you have spent an ample amount of
money. Then, you can find out the return of investment i.e. the click rate through the
banner ad.
If I have to define sensitivity, then sensitivity is nothing but the ratio of Predicted True
Events to Total Events. Now, True Events are the events which were true and the
model also predicts them as true.
To explain the Alternative Hypothesis, you can first explain what the null hypothesis
is. Null Hypothesis is a statistical phenomenon that is used to test for possible
rejection under the assumption that result of chance would be true.
After this, you can say that the alternative hypothesis is again a statistical
phenomenon which is contrary to the Null Hypothesis. Usually, it is considered that
the observations are a result of an effect with some chance of variation.
Q5. What is the difference between univariate, bivariate and
multivariate analysis?
For definition purposes, you can say that Eigenvectors are the directions along which
a specific linear transformation acts either by flipping, compressing or stretching.
You can answer this question, by first explaining, what exactly T-tests are. Refer
below for an explanation of T-Test.
T-Tests are a type of hypothesis tests, by which you can compare means. Each test
that you perform on your sample data, brings down your sample data to a single
value i.e. T-value. Refer below for the formula.
Now, to explain this formula, you can use the analogy of the signal-to-noise ratio,
since the formula is in a ratio format.
Here, the numerator would be a signal and the denominator would be the noise.
So, to calculate 1-Sample T-test, you have to subtract the null hypothesis value from
the sample mean. If your sample mean is equal to 7 and the null hypothesis value is
2, then the signal would be equal to 5.
So, we can say that the difference between the sample mean and the null hypothesis
is directly proportional to the strength of the signal.
Now, if you observe the denominator which is the noise, in our case it is the measure
of variability known as the standard error of the mean. So, this basically indicates
how accurately your sample estimates the mean of the population or your complete
dataset.
So, you can consider that noise is indirectly proportional to the precision of the
sample.
Explore Curriculum
Now, the ratio between the signal-to-noise is how you can calculate the T-Test 1. So,
you can see how distinguishable your signal is from the noise.
To calculate, 2-Sample Test, you need to find out the ratio between the difference of
the two samples to the null hypothesis.
So, if I have to summarize for you, the 1-Sample T-test determines how a sample set
holds against a mean, while the 2-Sample T-test determines if the mean between 2
sample sets is really significant for the entire population or purely by chance.
T-test: T-test is used when the standard deviation is unknown and the sample size is
comparatively small.
Chi-Square Test for Independence: These tests are used to find out the
significance of the association between categorical variables in the population
sample.
Analysis of Variance (ANOVA): This kind of hypothesis testing is used to analyze
differences between the means in various groups. This test is often used similarly to
a T-test but, is used for more than two groups.
Welch’s T-test: This test is used to find out the test for equality of means between
two population samples.
To represent a Bayesian Network in the form of Markov Random Fields, you can
consider the following examples:
Consider two variables which are connected through an edge in a Bayesian network,
then we can have a probability distribution that factorizes into a probability of A and
then the probability of B. Whereas, the same network if we mention in Markov
Random Field, it would be represented as a single potential function. Refer below:
Well, that was a simple example to start with. Now, moving onto a complex example where
one variable is a parent of the other two. Here A is the parent variable and it points down to
B and C. In such a case, the probability distribution would be equal to the probability of A
and the conditional probability of B given A and C given A. Now, if you have to convert this
into Markov Random Field, the factorization of the similarly structured graph, where we have
the potential function of A/B edge and a potential function for A/C edge. Refer to the image
below.
Fig 8: Representation of Bayesian Network in MRF – Data Analyst Interview
Questions
Variance and Covariance are two mathematical terms which are used frequently in
statistics. Variance basically refers to how apart numbers are in relation to the mean.
Covariance, on the other hand, refers to how two random variables will change
together. This is basically used to calculate the correlation between variables.
In case you have attended any Data Analytics interview in the recent past, do paste
those interview questions in the comments section and we’ll answer them ASAP.
You can also comment below if you have any questions in your mind, which you
might have faced in your Data Analytics interview.
Now, let us move on to the next set of questions which is the SAS Interview
Questions.
Data Analyst Interview
Questions: SAS
Statistical Analysis System(SAS) provided by SAS Institute itself is the most
popular Data Analytics tool in the market. In simple words, SAS can process
complex data and generate meaningful insights that would help organizations make
better decisions or predict possible outcomes in the near future. So, this lets you
mine, alter, manage and retrieve data from different sources and analyze it.
In the example that you can see below, the data sets are sorted by the variable Age.
We can sort and then join the data sets on Age by writing the following query:
1 data combined;
3 by Age;
4 run;
1. Write the DATA statement which will basically name the dataset.
2. Write the INPUT statement to name the variables in the data set.
3. All the statements should end with a semi-colon.
4. There should be a proper space between word and a statement.
Q3. What is the difference between the Do Index, Do While and the Do
Until loop? Give examples.
To answer this question, you can first answer what exactly a Do loop is. So, a Do
loop is used to execute a block of code repeatedly, based on a condition. You can
refer to the image below to see the workflow of the Do loop.
Do Index loop: We use an index variable as a start and stop value for Do Index
loop. The SAS statements get executed repeatedly till the index variable reaches its
final value.
Do While Loop: The Do While loop uses a WHILE condition. This Loop executes
the block of code when the condition is true and keeps executing it, till the condition
becomes false. Once the condition becomes false, the loop is terminated.
Do Until Loop: The Do Until loop uses an Until condition. This Loop executes the
block of code when the condition is false and keeps executing it, till the condition
becomes true. Once the condition becomes true, the loop is terminated.
If you have to explain with respect to the code, then let us say we want to calculate
the SUM and the number of variables.
Do Index
1
DATA ExampleLoop;
2 SUM=0;
3 Do VAR = 1 = 10;
5 END;
1 55 11
Do While
1
DATA ExampleLoop;
2
SUM = 0;
3 VAR = 1;
4 Do While(VAR<15);
6 VAR+1;
END;
7
PROC PRINT DATA = ExampleLoop;
8
Run;
9
Do Until
1
DATA ExampleLoop;
2
SUM = 0;
3 VAR = 1;
4 Do Until(VAR>15);
5 SUM=SUM+VAR;
6 VAR+1;
END;
7
PROC PRINT;
8
Run;
9
1 120 16
The ANYDIGIT function is used to search for a character string. After the string is
found it will simply return the desired string.
Q5. Can you tell the difference between VAR X1 – X3 and VAR X1 —
X3?
When you specify sing dash between the variables, then that specifies consecutively
numbered variables. Similarly, if you specify the Double Dash between the variables,
then that would specify all the variables available within the dataset.
For Example:
Consider the following data set:
The trailing @ is commonly known as the column pointer. So, when we use the
trailing @, in the Input statement, it gives you the ability to read a part of the raw data
line, test it and decide how can the additional data be read from the same record.
The single trailing @ tells the SAS system to “hold the line”.
The double trailing @@ tells the SAS system to “hold the line more strongly”.
An Input statement ending with @@ instructs the program to release the current raw
data line only when there are no data values left to be read from that line. The @@,
therefore, holds the input record even across multiple iterations of the data step.
Q7. What would be the result of the following SAS function (given that
31 Dec 2017 is Saturday)?
PROC SQL is nothing but a simultaneous process for all the observations. The
following steps occur when a PROC SQL gets executed:
SAS scans each and every statement in the SQL procedure and checks the syntax
errors.
The SQL optimizer scans the query inside the statement. So, the SQL optimizer
basically decides how the SQL query should be executed in order to minimize the
runtime.
If there are any tables in the FROM statement, then they are loaded into the data
engine where they can then be accessed in the memory.
Codes and Calculations are executed.
The Final Table is created in the memory.
The Final Table is sent to the output table described in the SQL statement.
Q9. If you are given an unsorted data set, how will you read the last
observation to a new dataset?
For example:
1 data example.newdataset;
3 If last;
4 run;
Q10. What are the differences between the sum function and using
“+” operator?
Example:
1 data exampledata1;
2 input a b c;
cards;
3
44 4 4
4
34 3 4
5
34 3 4
6
. 1 2
7
24 . 4
8 44 4 .
9 25 3 1
10 ;
11 run;
data exampledata2;
12
set exampledata1;
13
x = sum(a,b,c);
14
y=a+b+c;
15
run;
16
17
In the output, the value of y is missing for 4th, 5th, and 6th observation as we have
used the “+” operator to calculate the value of y.
x y
52 52
41 41
41 41
3 .
28 .
48 .
29 29
If you wish to know more questions on SAS, then refer a full-fledged article on SAS
Interview Questions.
Now, let us move on to the next set of questions which is the SQL Interview
Questions.
RDBMS is one of the most commonly used databases till date, and therefore SQL
skills are indispensable in most of the job roles such as a Data Analyst. Knowing
Structured Query Language, boots your path on becoming a data analyst, as it will
be clear in your interviews that you know how to handle databases.
The default TCP port assigned by the official Internet Number Authority(IANA) for
SQL server is 1433.
There are mainly 4 types of DBMS, which are Hierarchical, Relational, Network, and
Object-Oriented DBMS.
Hierarchical DBMS: As the name suggests, this type of DBMS has a style of
predecessor-successor type of relationship. So, it has a structure similar to that of a
tree, wherein the nodes represent records and the branches of the tree represent
fields.
Relational DBMS (RDBMS): This type of DBMS, uses a structure that allows the
users to identify and access data in relation to another piece of data in the database.
Network DBMS: This type of DBMS supports many to many relations wherein
multiple member records can be linked.
Object-oriented DBMS: This type of DBMS uses small individual software called
objects. Each object contains a piece of data and the instructions for the actions to
be done with the data.
failed. Here a transaction refers to a single operation. So, even if a single transaction
fails, then the entire transaction fails and the database state is left unchanged.
Consistency: This feature makes sure that the data must meet all the validation
rules. So, this basically makes sure that the transaction never leaves the database
Durability: Durability makes sure that your committed transaction is never lost. So,
this guarantees that the database will keep track of pending changes in such a way
that even if there is a power loss, crash or any sort of error the server can recover
Inner join: Inner Join in MySQL is the most common type of join. It is used to
return all the rows from multiple tables where the join condition is satisfied.
Left Join: Left Join in MySQL is used to return all the rows from the left table,
but only the matching rows from the right table where the join condition is
fulfilled.
Right Join: Right Join in MySQL is used to return all the rows from the right
table, but only the matching rows from the left table where the join condition is
fulfilled.
Full Join: Full join returns all the records when there is a match in any of the
tables. Therefore, it returns all the rows from the left-hand side table and all
the rows from the right-hand side table.
1 Select employeeId from (Select rownumber, employeeId from employee) where mod
where ‘employee’ is the table name.
Similarly, if you want to display the employeeId of odd records, then you can write
the following query
1 Select employeeId from (Select rownumber, employeeId from employee) where mod
Q7. Consider the following two tables.
Table 5: Example Table – Data Analyst Interview Questions
Now, write a query to get the list of customers who took the course
more than once on the same day. The customers should be grouped
by customer, and course and the list should be ordered according to
the most recent date.
1 SELECT
c.Customer_Id,
2
CustomerName,
3 Course_Id,
4
5 Course_Date,
6 count(Customer_Course_Id) AS count
7 FROM customers c JOIN course_details d ON d.Customer_Id = c.Customer_Id
GROUP BY c.Customer_Id,
8 CustomerName,
9 Course_Id,
10 Course_Date
11 HAVING count( Customer_Course_Id ) > 1
12 ORDER BY Course_Date DESC;
13
Q8. Consider the below Employee_Details table. Here the table has
various features such as Employee_Id, EmployeeName, Age, Gender,
and Shift. The Shift has m = Morning Shift and e = Evening Shift. Now,
you have to swap the ‘m’ and the ‘e’ values and vice versa, with a
single update query.
NVL(exp1, exp2) and NVL2(exp1, exp2, exp3) are functions which check whether
the value of exp1 is null or not.
If we use NVL(exp1,exp2) function, then if exp1 is not null, then the value of exp1 will
be returned; else the value of exp2 will be returned. But, exp2 must be of the same
data type of exp1.
Similarly, if we use NVL2(exp1, exp2, exp3) function, then if exp1 is not null, exp2
will be returned, else the value of exp3 will be returned.
If you wish to know more questions on SQL, then refer a full-fledged article on SQL
Interview Questions.
Now, moving onto the next set of questions asked i.e. the Tableau Interview
Questions.
Q1. What are the differences between Tableau and Power BI?
Dual Axis is a phenomenon provided by Tableau. This helps the users to view two
scales of two measures in the same graph. Websites such as Indeed.com make use
of dual axis to show the comparison between two measures and the growth of these
two measures in a septic set of years. Dual axes let you compare multiple measures
at once, having two independent axes layered on top of one another. Refer to the
below image to see how it looks.
The Joining term is used when you are combining data from the same source, for
example, worksheet in an Excel file or tables in an Oracle database.
While blending requires two completely defined data sources in your report.
To create a calculated field in Tableau, you can follow the below steps:
Click the drop down to the right of Dimensions on the Data pane and select
“Create > Calculated Field”to open the calculation editor.
Name the new field and create a formula.
Learn more about this data visualization tool with Tableau certification training from
industry experts.
To view the underlying SQL Queries in Tableau, we mainly have two options:
Q6. Design a view in a map such that if a user selects any country, the
states under that country has to show profit and sales.
According to your question, you must have a country, state, profit and sales fields in
your dataset.
Q7. What is the difference between heat map and tree map?
A heat map is used for comparing categories with color and size. With heat maps,
you can compare two different measures together. A treemap is a powerful
visualization that does the same as that of the heat map. Apart from that, it is also
used for illustrating hierarchical data and part-to-whole relationships.
Fig 13: Difference Between Heat Map and Tree Map – Data Analyst Interview
Questions
You can aggregate measures using Tableau only for relational data sources.
Multidimensional data sources contain aggregated data only. In Tableau,
multidimensional data sources are supported only in Windows.
Disaggregation of data: Disaggregation of data allows you to view every row of the
data source which can be useful while analyzing measures.
Q10. Can you tell how to embed views onto Web pages?
You can embed interactive Tableau views and dashboards into web pages, blogs,
wiki pages, web applications, and intranet portals. Embedded views update as the
underlying data changes, or as their workbooks are updated on Tableau Server.
Embedded views follow the same licensing and permission restrictions used
on Tableau Server. That is, to see a Tableau view that’s embedded in a web page,
the person accessing the view must also have an account on Tableau Server.
Alternatively, if your organization uses a core-based license on Tableau Server, a
Guest account is available. This allows people in your organization to view and
interact with Tableau views embedded in web pages without having to sign in to the
server. Contact your server or site administrator to find out if the Guest user is
enabled for the site you publish to.
You can do the following to embed views and adjust their default appearance:
If you wish to know more questions on Tableau, then refer a full-fledged article
on Tableau Interview Questions.
Now, moving onto something more interesting, I have planned up a set of 5 puzzles,
that are most commonly asked in the Data Analyst Interviews.
If you notice the condition in the question, you will observe that there is a circular
misplacement. By which I mean that, if Black is wrongly labeled as Black, Black
cannot be labeled as White. So, it must be named as Back + White. If you consider
that all the 3 jars are wrongly placed, that is, Black + White jar contains either the
Black balls or the White balls, but not the both. Now, just assume you pick one ball
from the Black + White jar and let us assume it to be a Black ball. So, obviously, you
will name the jar as Black. However, the jar labeled Black cannot have Black +
White. Thus, the third jar left in the process should be labeled Black + White. So, if
you just pick up one ball, you can correctly label the jars.
Q2. Pumpkin must be equally divided into 8 equal pieces. You can
have only 3 cuts.
The approach to answering this question is simple. You just must cut the pumpkin
horizontally down the center, followed by making 2 other cuts vertically intersecting
each other. So, this would give you your 8 equal pieces.
Q3. There are 5 lanes on a race track. One needs to find out the 3
fastest horses among the total of 25.
Now, you can start solving the problem by considering the number of cars racing.
Since there are 25 cars racing with 5 lanes, there would be initially 5 races
conducted, with each group having 5 cars. Next, a sixth race will be conducted
between the winners of the first 5 races to determine the 3 fastest cars(let us say X1,
Y1, and Z1).
Now, suppose X1 is the fastest among the three, then that means A1 is the fastest
car among the 25 cars racing. But the question is how to find the 2 nd and the
3rd fastest? We cannot assume that Y1 and Z1 are 2 nd and 3rd since it may happen
that the rest cars from the group of X1s’ cars could be faster than Y1 and Z1. So, to
determine this a 7th race is conducted between cars Y1, Z1, and the cars from X1’s
group(X2, X3), and the second car from Y1’s group Y2.
So, the cars that finish the 1 st and 2nd is the 7th race are actually the 2nd and the
3rd fastest cars among all cars.
Q4. Consider 10 stacks of 10 coins each, where each coin weighs 10
grams. But, one of the 10 stacks is defective, and this defective stack
contains the coins of 9 grams each.
The solution to this puzzle is very simple. You just must pick 1 coin from the 1 st stack,
2 coins from the 2nd stack, 3 coins from the 3rd stack and so on till 10 coins from the
10th stack. So, if you add the number of coins then it would be equal to 55.
So, if none of the coins are defective then the weight would 55*10 = 550 grams.
Yet, if stack 1 turns out to be defective, then the total weight would be 1 less then
550 grams, that is 549 grams. Similarly, if stack 2 was defective then the total weight
would be equal to 2 less than 50 grams, that is 548 grams. Similarly, you can find for
the other 8 cases.
Q5. Two buses running towards each other on the same track are
moving at a speed of 40km/hr and are separated by 80km. A bird
takes it flight from the bus A and flies towards bus B at a constant
speed of 100km/hr. Once it reaches bus Y, it turns and starts flying
back towards bus X. The bird keeps flying to and forth till both the
buses collide.
The velocity of the two buses approaching towards each other = (40 +
40)km/hr
The time taken for the buses to collide = 80km/hr = 1 hour.
The total distance traveled by the bird = 100km/hr * 1 hr = 100 km.
I hope you found this Data Analyst Interview Questions’ blog informative. The
questions that you learned in this Data Analyst Interview Questions’ blog are
the most sought-after questions that are asked in the interview which will help you
crack your interviews.
Data Analyst Masters Program follows a set structure with 4 core courses and 7
electives spread across 15 weeks. It makes you an expert in key technologies
related to Data Analytics. It is a structured learning path recommended by leading
industry experts and ensures that you transform into an expert Data Analytics
professional while making you learn the usage of tools such
as R, SAS, Tableau, QlikView, Advanced Excel, Machine learning, etc. Individual
courses focus on specialization in one or two specific skills, however, if you intend to
become a Data Analyst, then this is the path for you to follow.
If you have any queries related to this article please leave them in the comments
section below and we will revert as soon as possible.
Table of Contents
What is a Data Analyst?
View More
Data has changed the face of our world over the last ten years. The numerous
emails, text messages we share, YouTube videos we watch are part of the nearly
2.5 quintillion bytes of data generated daily across the world. Businesses, both large
and small, deal with massive data volumes, and a lot depends on their ability to
glean meaningful insights from them. A data analyst does precisely that. They
interpret statistical data and turn it into useful information that businesses and
organizations can use for critical decision-making.
The role of a data analyst can be defined as someone who has the knowledge and
skills to turn raw data into information and insight, which can be used to make
business decisions.
Using automated tools to extract data from primary and secondary sources
Removing corrupted data and fixing coding errors and related problems
Filter Data by reviewing reports and performance indicators to identify and correct code
problems
Using statistical tools to identify, analyze, and interpret patterns and trends in complex
data sets that could be helpful for the diagnosis and prediction
Analyzing local, national, and global trends that impact both the organization and the
industry
Preparing reports for the management stating trends, patterns, and predictions using
relevant data
Preparing final analysis reports for the stakeholders to understand the data-analysis
steps, enabling them to take important decisions based on various facts and trends.
Another integral element of data analyst job description is EDA or Exploratory Data
Analysis Project. In such data analyst projects, the analyst needs to scrutinize data
to recognize and identify patterns. The next thing data analysts do is use data
modeling techniques to summarize the overall features of data analysis.
Proficiency in statistics and statistical packages like Excel, SPSS, SAS to be used for
data set analyzing
Adept at using data processing platforms like Hadoop and Apache Spark
Knowledge of how to create and apply the most accurate algorithms to datasets in order
to find solutions
Problem-solving skills
Team-working skills
You need more than technical expertise to excel in a career in data analytics. A
bachelor’s degree in a field that emphasizes on statistical and analytical skills is
desired. Students from mathematics, statistics, computer science, or economics
background usually have an edge in the data analyst career path. However, a
postgraduate course in data analytics like Data Analytics Bootcamp can make you
an industry-ready professional.
creativity
Data analysts typically move on to higher positions like senior data analysts, data
scientists, data analytics managers, business analysts, etc. Higher responsibilities
come with a substantial pay rise as well. It is estimated that the average annual
salary of data scientists starts at around $95,000, while that of analytical managers
begins at approximately $106,000.
Watch the video below that will help you have an understanding of the various
responsibilities, skills required, and the salary structure of top Data Analytics job
roles.
If you are looking for a data analyst job, you can choose from more than 86 thousand
open jobs worldwide. Shocking, isn’t it? This is mainly because nearly all industries
benefit from data analysis. Today, the data analyst job description is branching off
into various specializations like finance, healthcare, business, marketing, and e-
commerce.
Presently, business intelligence companies have the highest number of job openings
for data analysts in the US and Europe, followed by finance, sharing economy
services, healthcare, and entertainment companies.
Some of the top global companies hiring data analysts include Amazon, Netflix,
Google, Intuit, Facebook, Apple, CISCO Systems. Smaller companies include Focus
KPI, Affinity Solutions, Norgate Technology, Financial giants like Paypal and
Barclays are also hiring data analysts across various departments.
What is Data Anal`dysis?
Collect Data: The data is collected from a variety of sources and is then stored to
be cleaned and prepared. This step involves removing all missing values and
outliers.
Analyse Data: As soon as the data is prepared, the next step is to analyze it.
Improvements are made by running a model repeatedly. Following that, the model
is validated to ensure that it is meeting the requirements.
Create Reports: In the end, the model is implemented, and reports are generated
as well as distributed to stakeholders.
Download PDF
4. What are the different challenges one faces during data analysis?
While analyzing data, a Data Analyst can encounter the following issues:
Duplicate entries and spelling errors. Data quality can be hampered and reduced by
these errors.
The representation of data obtained from multiple sources may differ. It may cause
a delay in the analysis process if the collected data are combined after being
cleaned and organized.
Another major challenge in data analysis is incomplete data. This would invariably
lead to errors or faulty results.
You would have to spend a lot of time cleaning the data if you are extracting data
from a poor source.
Business stakeholders' unrealistic timelines and expectations
Data blending/ integration from multiple sources is a challenge, particularly if there
are no consistent parameters and conventions
Insufficient data architecture and tools to achieve the analytics goals on time.
RapidMiner
KNIME
Google Search Operators
Google Fusion Tables
Solver
NodeXL
OpenRefine
Wolfram Alpha
io
Tableau, etc.
Data mining Process: It generally involves analyzing data to find relations that
were not previously discovered. In this case, the emphasis is on finding unusual
records, detecting dependencies, and analyzing clusters. It also involves analyzing
large datasets to determine trends and patterns in them.
Field Level Validation: This method validates data as and when it is entered into
the field. The errors can be corrected as you go.
Form Level Validation: This type of validation is performed after the user submits
the form. A data entry form is checked at once, every field is validated, and
highlights the errors (if present) so that the user can fix them.
Data Saving Validation: This technique validates data when a file or database
record is saved. The process is commonly employed when several data entry forms
must be validated.
Search Criteria Validation: It effectively validates the user's search criteria in order
to provide the user with accurate and related results. Its main purpose is to ensure
that the search results returned by a user's query are highly relevant.
9. Explain Outlier.
In a dataset, Outliers are values that differ significantly from the mean of
characteristic features of a dataset. With the help of an outlier, we can determine
either variability in the measurement or an experimental error. There are two kinds
of outliers i.e., Univariate and Multivariate. The graph depicted below shows there
are four outliers in the dataset.
10. What are the ways to detect outliers? Explain different ways to
deal with it.
Box Plot Method: According to this method, the value is considered an outlier if it
exceeds or falls below 1.5*IQR (interquartile range), that is, if it lies above the top
quartile (Q3) or below the bottom quartile (Q1).
Standard Deviation Method: According to this method, an outlier is defined as a
value that is greater or lower than the mean ± (3*standard deviation).
A KNN (K-nearest neighbor) model is usually considered one of the most common
techniques for imputation. It allows a point in multidimensional space to be
matched with its closest k neighbors. By using the distance function, two attribute
values are compared. Using this approach, the closest attribute values to the
missing values are used to impute these missing values.
Known as the bell curve or the Gauss distribution, the Normal Distribution plays a
key role in statistics and is the basis of Machine Learning. It generally defines and
measures how the values of a variable differ in their means and standard
deviations, that is, how their values are distributed.
The above image illustrates how data usually tend to be distributed around a
central value with no bias on either side. In addition, the random variables are
distributed according to symmetrical bell-shaped curves.
Data visualization has grown rapidly in popularity due to its ease of viewing and
understanding complex data in the form of charts and graphs. In addition to
providing data in a format that is easier to understand, it highlights trends and
outliers. The best visualizations illuminate meaningful information while removing
noise from data.
NumPy
Bokeh
Matplotlib
Pandas
SciPy
SciKit, etc.
Hash tables are usually defined as data structures that store data in an associative
manner. In this, data is generally stored in array format, which allows each data
value to have a unique index value. Using the hash technique, a hash table
generates an index into an array of slots from which we can retrieve the desired
value.
18. What do you mean by collisions in a hash table? Explain the ways
to avoid it.
Hash table collisions are typically caused when two keys have the same index.
Collisions, thus, result in a problem because two elements cannot share the same
slot in an array. The following methods can be used to avoid such hash collisions:
Example:
Collaborative filtering can be seen, for instance, on online shopping sites when you
see phrases such as "recommended for you”.
In the field of Time Series Analysis (TSA), a sequence of data points is analyzed over
an interval of time. Instead of just recording the data points intermittently or
randomly, analysts record data points at regular intervals over a period of time in
the TSA. It can be done in two different ways: in the frequency and time domains.
As TSA has a broad scope of application, it can be used in a variety of fields. TSA
plays a vital role in the following places:
Statistics
Signal processing
Econometrics
Weather forecasting
Earthquake prediction
Astronomy
Applied science
Clustering is the process of categorizing data into groups and clusters. In a dataset,
it identifies similar data groups. It is the technique of grouping a set of objects so
that the objects within the same cluster are similar to one another rather than to
those located in other clusters. When implemented, the clustering algorithm
possesses the following properties:
Flat or hierarchical
Hard or Soft
Iterative
Disjunctive
One of the basic tools for data analysis is the Pivot Table. With this feature, you can
quickly summarize large datasets in Microsoft Excel. Using it, we can turn columns
into rows and rows into columns. Furthermore, it permits grouping by any field
(column) and applying advanced calculations to them. It is an extremely easy-to-
use program since you just drag and drop rows/columns headers to build a report.
Pivot tables consist of four different sections:
Univariate Analysis: The word uni means only one and variate means variable, so a
univariate analysis has only one dependable variable. Among the three analyses,
this is the simplest as the variables involved are only one.
Example: A simple example of univariate data could be height as shown below:
In order to handle Big Data, multiple tools are used. There are a few popular ones
as follows:
Hadoop
Spark
Scala
Hive
Flume
Mahout, etc.
One of the most famous partitioning methods is K-mean. With this unsupervised
learning algorithm, the unlabeled data is grouped in clusters. Here, 'k' indicates the
number of clusters. It tries to keep each cluster separated from the other. Since it is
an unsupervised model, there will be no labels for the clusters to work with.
30. Write the difference between variance and covariance.
Variance: In statistics, variance is defined as the deviation of a data set from its
mean value or average value. When the variances are greater, the numbers in the
data set are farther from the mean. When the variances are smaller, the numbers
are nearer the mean. Variance is calculated as follows:
Also known as source control, version control is the mechanism for configuring
software. Records, files, datasets, or documents can be managed with this. Version
control has the following advantages:
Analysis of the deletions, editing, and creation of datasets since the original copy
can be done with version control.
Software development becomes clearer with this method.
It helps distinguish different versions of the document from one another. Thus, the
latest version can be easily identified.
There's a complete history of project files maintained by it which comes in handy if
ever there's a failure of the central server.
Securely storing and maintaining multiple versions and variants of code files is easy
with this tool.
Using it, you can view the changes made to different files.
33. Mention some of the statistical techniques that are used by Data
analysts.
Performing data analysis requires the use of many different statistical techniques.
Some important ones are as follows:
Markov process
Cluster analysis
Imputation techniques
Bayesian methodologies
Rank statistics
34. What's the difference between a data lake and a data warehouse?
The storage of data is a big deal. Companies that use big data have been in the
news a lot lately, as they try to maximize its potential. Data storage is usually
handled by traditional databases for the layperson. For storing, managing, and
analyzing big data, companies use data warehouses and data lakes.
Data Warehouse: This is considered an ideal place to store all the data you gather
from many sources. A data warehouse is a centralized repository of data where data
from operational systems and other sources are stored. It is a standard tool for
integrating data across the team- or department-silos in mid-and large-sized
companies. It collects and manages data from varied sources to provide meaningful
business insights. Data warehouses can be of the following types:
Enterprise data warehouse (EDW): Provides decision support for the entire
organization.
Operational Data Store (ODS): Has functionality such as reporting sales data or
employee data.
Data Lake: Data lakes are basically large storage device that stores raw data in their
original format until they are needed. with its large amount of data, analytical
performance and native integration are improved. It exploits data warehouses'
biggest weakness: their incapacity to be flexible. In this, neither planning nor
knowledge of data analysis is required; the analysis is assumed to happen later, on-
demand.
Inspecting data
Cleaning data
Transforming data
2.
Data Mining
Predictive Intelligence
Business Intelligence
Text Analytics
3.
What is meant by 'outlier'?
Arithmetic mean
Unquantifiable variables
4.
5.
Information graphics, as tables and charts, are used in data visualization to provide
information to users clearly and efficiently.
Data Visualization makes complicated data more understandable, accessible, and usable.
6.
Array data
Data
Geometric Series
7.
Which of the following is an important process used to extract data patterns using
intelligent methods?
Warehousing
Data Mining
Text Mining
8.
9.
10.
Collaborative filtering aims to accomplish what?
11.
The PivotTable Fields List does not include which of the following boxes?
Column Labels
Report Filter
Values
Formulas
In data mining, raw data is converted into valuable It cannot identify inaccurate or
information. incorrect data values.
Data Wrangling is the process wherein raw data is cleaned, structured, and enriched
into a desired usable format for better decision making. It involves discovering,
structuring, cleaning, enriching, validating, and analyzing data. This process can turn
and map out large amounts of data extracted from various sources into a more
useful format. Techniques such as merging, grouping, concatenating, joining, and
sorting are used to analyze the data. Thereafter it gets ready to be used with another
dataset.
This is one of the most basic data analyst interview questions. The various steps
involved in any common analytics projects are as follows:
Understand the business problem, define the organizational goals, and plan for a
lucrative solution.
Collecting Data
Gather the right data from various sources and other information based on your
priorities.
Cleaning Data
Clean the data to remove unwanted, redundant, and missing values, and make it
ready for analysis.
Exploring and Analyzing Data
Use data visualization and business intelligence tools, data mining techniques, and
predictive modeling to analyze data.
Interpret the results to find out hidden patterns, future trends, and gain insights.
4. What are the common problems that data analysts encounter during
analysis?
Handling duplicate
5. Which are the technical tools that you have used for analysis and
presentation purposes?
As a data analyst, you are expected to know the tools mentioned below for analysis
and presentation purposes. Some of the popular tools you should know are:
MS Excel, Tableau
Python, R, SPSS
Create a data cleaning plan by understanding where the common errors take place and
keep all the communications open.
Before working with the data, identify and remove the duplicates. This will lead to an easy
and effective data analysis process.
Focus on the accuracy of the data. Set cross-field validation, maintain the value types of
data, and provide mandatory constraints.
Normalize the data at the entry point so that it is less chaotic. You will be able to ensure
that all information is standardized, leading to fewer errors on entry.
It helps you obtain confidence in your data to a point where you’re ready to engage a
machine learning algorithm.
It allows you to refine your selection of feature variables that will be used later for model
building.
You can discover hidden trends and insights from the data.
Suggest various
It provides insights into the
Understands the future to courses of action to
past to answer “what has
answer “what could happen” answer “what should
happened”
you do”
Uses simulation
algorithms and
Uses data aggregation and Uses statistical models and
optimization techniques
data mining techniques forecasting techniques
to advise possible
outcomes
Systematic sampling
Cluster sampling
Stratified sampling
Univariate analysis is the simplest and easiest form of data analysis where the data
being analyzed contains only one variable.
Example - Studying the heights of players in the NBA.
The bivariate analysis involves the analysis of two variables to find causes,
relationships, and correlations between the variables.
Example – Analyzing the sale of ice creams based on the temperature outside.
This is one of the most frequently asked data analyst interview questions, and the
interviewer expects you to give a detailed answer here, and not just the name of the
methods. There are four methods to handle missing values in a dataset.
Listwise Deletion
In the listwise deletion method, an entire record is excluded from analysis if any
single value is missing.
Average Imputation
Take the average value of the other participants' responses and fill in the missing
value.
Regression Substitution
Multiple Imputations
It creates plausible values based on the correlations for the missing data and then
averages the simulated datasets by incorporating random errors in your predictions.
68% of the data falls within one standard deviation of the mean
95% of the data lies between two standard deviations of the mean
99.7% of the data lies between three standard deviations of the mean
Time Series analysis is a statistical procedure that deals with the ordered sequence
of values of a variable at equally spaced time intervals. Time series data are
collected at adjacent periods. So, there is a correlation between the observations.
This feature distinguishes time-series data from cross-sectional data.
This is another frequently asked data analyst interview question, and you are
expected to cover all the given differences!
Overfitting Underfitting
An outlier is a data point that is distant from other similar points. They may be due to
variability in the measurement or may indicate experimental errors.
The graph depicted below shows there are three outliers in the dataset.
To deal with outliers, you can use the following four methods:
Alternative hypothesis: It states that there is some relation between the predictor and
outcome variables in the population. It is denoted by H1.
In Hypothesis testing, a Type I error occurs when the null hypothesis is rejected even
if it is true. It is also known as a false positive.
A Type II error occurs when the null hypothesis is not rejected, even if it is false. It is
also known as a false negative.
22. Can you provide a dynamic range in “Data Source” for a Pivot table?
Yes, you can provide a dynamic range in the “Data Source” of Pivot tables. To do
that, you need to create a named range using the offset function and base the pivot
table using a named range constructed in the first step.
23. What is the function to find the day of the week for a particular date
value?
The get the day of the week, you can use the WEEKDAY() function.
The above function will return 6 as the result, i.e., 17th December is a Saturday.
AND() is a logical function that checks multiple conditions and returns TRUE or
FALSE based on whether the conditions are met.
Syntax: AND(logica1,[logical2],[logical3]....)
In the below example, we are checking if the marks are greater than 45. The result
will be true if the mark is >45, else it will be false.
25. Explain how VLOOKUP works in Excel?
VLOOKUP is used when you need to find things in a table or a range by row.
If you wanted to find the department to which Stuart belongs to, you could use the
VLOOKUP function as shown below:
Here, A11 cell has the lookup value, A2:E7 is the table array, 3 is the column index
number with information about departments, and 0 is the range lookup.
If you hit enter, it will return “Marketing”, indicating that Stuart is from the marketing
department.
26. What function would you use to get the current date and time in Excel?
In Excel, you can use the TODAY() and NOW() function to get the current date and
time.
27. Using the below sales table, calculate the total quantity sold by sales
representatives whose name starts with A, and the cost of each item they
have sold is greater than 10.
You can use the SUMIFS() function to find the total quantity.
For the Sales Rep column, you need to give the criteria as “A*” - meaning the name
should start with the letter “A”. For the Cost each column, the criteria should be “>10”
- meaning the cost of each item is greater than 10.
28. Using the data given below, create a pivot table to find the total sales
made by each sales representative for each item. Display the sales as % of
the grand total.
Select the entire table range, click on the Insert tab and choose PivotTable
Select the table range and the worksheet where you want to place the pivot table
Drag Sale total on to Values, and Sales Rep and Item on to Row Labels. It will give the
sum of sales made by each representative for every item they have sold.
Right-click on “Sum of Sale Total’ and expand Show Values As to select % of Grand
Total.
Below is the resultant pivot table.
Now, let’s filter the table for directors whose movies have an average duration
greater than 115 minutes.
Answer all of the given differences when this data analyst interview question is
asked, and also give out the syntax for each to prove your thorough knowledge to
the interviewer.
WHERE HAVING
In the WHERE clause, the filter occurs before any groupings HAVING is used to filter values
are made. from a group.
SELECT column_name(s)
FROM table_name
WHERE condition
GROUP BY column_name(s)
HAVING condition
ORDER BY column_name(s);
31. Is the below SQL query correct? If not, how will you rectify it?
The query stated above is incorrect as we cannot use the alias name while filtering
data using the WHERE clause. It will throw an error.
32. How are Union, Intersect, and Except used in SQL?
The Union operator combines the output of two or more SELECT statements.
Syntax:
Let’s consider the following example, where there are two tables - Region 1 and
Region 2.
Syntax:
The Except operator returns the uncommon records that are the results of 2 or more
SELECT statements.
Syntax:
Below is an example of a subquery that returns the name, email id, and phone
number of an employee from Texas city.
FROM employee
WHERE emp_id IN (
SELECT emp_id
FROM employee
34. Using the product_price table, write an SQL query to find the record
with the fourth-highest market price.
Fig: Product Price table
Now, select the top one from the above result that is in ascending order of mkt_price.
36. Using the product and sales order detail table, find the products with
total units sold greater than 1.5 million.
Fig: Products table
We can use an inner join to get records from both the tables. We’ll join the tables
based on a common key column, i.e., ProductID.
You must be prepared for this question thoroughly before your next data analyst
interview. The stored procedure is an SQL script that is used to run a task several
times.
Let’s look at an example to create a stored procedure to find the sum of the first N
natural numbers' squares.
Output: Display the sum of the square for the first four natural numbers
38. Write an SQL stored procedure to find the total even number between
two users given numbers.
Here is the output to print all even numbers between 30 and 45.
All the combined sheets or tables contain a common set Meanwhile, in data blending,
of dimensions and measures. each data source contains its
own set of dimensions and
measures.
Extract: Extract is an image of the data that will be extracted from the data source
and placed into the Tableau repository. This image(snapshot) can be refreshed
periodically, fully, or incrementally.
Live: The live connection makes a direct connection to the data source. The data will
be fetched straight from tables. So, data is always up to date and consistent.
42. What are the different joins that Tableau provides?
Joins in Tableau work similarly to the SQL join statement. Below are the types of
joins that Tableau supports:
Inner Join
A Gantt chart in Tableau depicts the progress of value over the period, i.e., it shows
the duration of events. It consists of bars along with the time axis. The Gantt chart is
mostly used as a project management tool where each bar is a measure of a task in
the project.
Drag Category and Subcategory columns into Rows, and Sales on to Columns. It will
result in a horizontal bar chart.
Drag Profit on to Colour, and Quantity on to Label. Sort the Sales axis in descending
order of the sum of sales within each sub-category.
45. Create a dual-axis chart in Tableau to present Sales and Profit across
different years using the Sample Superstore dataset.
Drag the Order Date field from Dimensions on to Columns, and convert it into continuous
Month.
Drag Sales on to Rows, and Profits to the right corner of the view until you see a light
green rectangle.
46. Design a view in Tableau to show State-wise Sales and Profit using the
Sample Superstore dataset.
Drag the Country field on to the view section and expand it to see the States.
Drag the Sales field on to Size, and Profit on to Colour.
Increase the size of the bubbles, add a border, and halo color.
From the above map, it is clear that states like Washington, California, and New York
have the highest sales and profits. While Texas, Pennsylvania, and Ohio have good
amounts of sales but the least profits.
Treemaps Heatmaps
48. Using the Sample Superstore dataset, display the top 5 and bottom 5
customers based on their profit.
Give a name to the set and select the top tab to choose the top 5 customers by
sum(profit)
Similarly, create a set for the bottom five customers by sum(profit)
Select both the sets, right-click to create a combined set. Give a name to the set and
choose All members in both sets.
Drag top and bottom customers set on to Filters, and Profit field on to Colour to get the
desired result.
50. What are the different ways to create a data frame in Pandas?
By initializing a list
By initializing a dictionary
51. Write the Python code to create an employee’s data frame from the
“emp.csv” file and display the head and summary.
To create a DataFrame in Python, you need to import the Pandas library and use the
read_csv function to load the .csv file. Give the right location where the file name and
its extension follow the dataset.
You can use the column names to extract the desired columns.
54. Suppose there is an array that has values [0,1,2,3,4,5,6,7,8,9]. How will
you display the following values from the array - [1,3,5,7,9]?
Since we only want the odd number from 0 to 9, you can perform the modulus
operation and check if the remainder is equal to 1.
55. There are two arrays, ‘a’ and ‘b’. Stack the arrays a and b horizontally
using the NumPy library in Python.
You can either use the concatenate() or the hstack() function to stack the arrays.
Suppose there is an emp data frame that has information about a few employees.
Let’s add an Address column to that data frame.
58. From the below DataFrame, how will you find each column's unique
values and subset the data for Age<35 and Height>6?
To find the unique values and number of unique elements, use the unique() and
nunique() function.
Now, subset the data for Age<35 and Height>6.
59. Plot a sine graph using NumPy and Matplotlib library in Python.
Group the company column and use the mean function to find the average sales
So, those were the 60 data analyst interview questions that can help you crack your
next data analyst interview and help you become a data analyst.
Conclusion