Brainalyst's Data Analytics & Visualization Interview Kit
Brainalyst's Data Analytics & Visualization Interview Kit
Brainalyst's Data Analytics & Visualization Interview Kit
AND VI
SUALIZATION
INTERVIEW
GUIDE
Q
UES
TI
ONS&A
NSWE
RS
ABOUT BRAINALYST
Brainalyst is a pioneering data-driven company dedicated to transforming data into actionable insights and
innovative solutions. Founded on the principles of leveraging cutting-edge technology and advanced analytics,
Brainalyst has become a beacon of excellence in the realms of data science, artificial intelligence, and machine
learning.
OUR MISSION
At Brainalyst, our mission is to empower businesses and individuals by providing comprehensive data solutions
that drive informed decision-making and foster innovation. We strive to bridge the gap between complex data and
meaningful insights, enabling our clients to navigate the digital landscape with confidence and clarity.
WHAT WE OFFER
• Data Strategy Development: Crafting customized data strategies aligned with your business
objectives.
• Advanced Analytics Solutions: Implementing predictive analytics, data mining, and statistical
analysis to uncover valuable insights.
• Business Intelligence: Developing intuitive dashboards and reports to visualize key metrics and
performance indicators.
• Machine Learning Models: Building and deploying ML models for classification, regression,
clustering, and more.
• Natural Language Processing: Implementing NLP techniques for text analysis, sentiment analysis,
and conversational AI.
• Computer Vision: Developing computer vision applications for image recognition, object detection,
and video analysis.
• Workshops and Seminars: Hands-on training sessions on the latest trends and technologies in
data science and AI.
• Customized Training Programs: Tailored training solutions to meet the specific needs of
organizations and individuals.
2021-2024
4. Generative AI Solutions
As a leader in the field of Generative AI, Brainalyst offers innovative solutions that create new content and
enhance creativity. Our services include:
• Content Generation: Developing AI models for generating text, images, and audio.
• Creative AI Tools: Building applications that support creative processes in writing, design, and
media production.
• Generative Design: Implementing AI-driven design tools for product development and
optimization.
OUR JOURNEY
Brainalyst’s journey began with a vision to revolutionize how data is utilized and understood. Founded by
Nitin Sharma, a visionary in the field of data science, Brainalyst has grown from a small startup into a renowned
company recognized for its expertise and innovation.
KEY MILESTONES:
• Inception: Brainalyst was founded with a mission to democratize access to advanced data analytics and AI
technologies.
• Expansion: Our team expanded to include experts in various domains of data science, leading to the
development of a diverse portfolio of services.
• Innovation: Brainalyst pioneered the integration of Generative AI into practical applications, setting new
standards in the industry.
• Recognition: We have been acknowledged for our contributions to the field, earning accolades and
partnerships with leading organizations.
Throughout our journey, we have remained committed to excellence, integrity, and customer satisfaction.
Our growth is a testament to the trust and support of our clients and the relentless dedication of our team.
Choosing Brainalyst means partnering with a company that is at the forefront of data-driven innovation. Our
strengths lie in:
• Expertise: A team of seasoned professionals with deep knowledge and experience in data science and AI.
• Customer Focus: A dedication to understanding and meeting the unique needs of each client.
• Results: Proven success in delivering impactful solutions that drive measurable outcomes.
JOIN US ON THIS JOURNEY TO HARNESS THE POWER OF DATA AND AI. WITH BRAINALYST, THE FUTURE IS
DATA-DRIVEN AND LIMITLESS.
2021-2024
BRAINALYST - DATA ANALYTICS AND VISUALIZATION INTERVIEW QUESTIONS
Excel:
Excel Questions to practice: Excel Practice
- Ditching the Ordinary: Say goodbye to standard charts; Power BI’s custom visualizations offer
unique options.
- Marketplace Exploration: Dive into the extensive Power BI marketplace, where numerous custom
visuals await experimentation.
- Precision in Selection: Choose visuals that fit seamlessly with your data and storytelling goals.
- Beyond Basic Charts: Explore advanced features like forecasting, clustering, and key influencers for
a more sophisticated analysis.
- Insightful Revelations: Delve deeper into your data, revealing hidden patterns and relationships that
basic charts might miss.
- Holistic Data Understanding: Use advanced analytics tools to gain a nuanced and comprehensive
understanding of your dataset.
- Crafting Visual Masterpieces: Hone your formatting skills to transform your reports into visually
stunning presentations.
- Spotlight on Significance: Emphasize critical data points using conditional formatting techniques.
- User-Centric Interaction: Improve user experience through interactive features such as drill-through
options and report tooltips.
- Artistry in Design: Infuse creativity into your reports with thoughtful choices in color schemes,
fonts, and layout designs.
- Staying Curious: Approach Power BI visualization as an ongoing learning journey, always seeking new
techniques and approaches.
- Community Engagement: Connect with the Power BI community for insights, tips, and collaborative
learning.
- Real-World Application: Apply your newfound skills to real-world scenarios, refining your expertise
through practical experience.
Q2. How can we deal with problems that arise when the data flows in from a variety of sources?
Answer:
There are many ways to go about dealing with multi-source problems. However,
these are done primarily to solve the problems of:
• Identifying the presence of similar/same records and merging them into a single record
Press Return.
Using the button, you can round off in Excel by following these steps –
=IF(EXACT(A2,B2),”Match”,”Mismatch”)
The relevant operators used in the formula should be kept between opening and closing parenthesis.
Press Enter to get the results.
Macro is great for repetitive tasks and eliminates errors. For example, suppose an account manager
must share reports regarding the company employees for non-payment of dues. In that case, it can
be automated using a Macro and doing minor changes every month, as needed.
The cells can be used to input client or account holder information. The expenses can be calculated
using the formula =SUM (F3:F6). You can also use tools such as expense tracking tools and contract
tools for auto-invoicing, performing tracking, and billing of expenses.
Q18. How would you track down the last line and segment in VBA?
Answer:
To track down the last column, utilize the underneath lines code in the VBA module:
Sub FindingLastRow()
Faint lastRow As Long
lastRow = ActiveSheet.Cells.SpecialCells(xlLastCell).Row
MsgBox (lastRow)
End Sub
To track down the last section, utilize the beneath lines code in the VBA module:
Sub FindingLastColumn()
Faint lastRow As Long
lastColumn = ActiveSheet.Cells.SpecialCells(xlLastCell).Column
MsgBox (lastColumn)
End Sub
Q19. How to prevent someone from copying the cell from your worksheet in excel?
Answer:
If you want to protect your worksheet from being copied, go into Menu bar > Review > Protect
sheet > Password.
By entering password, you can prevent your worksheet from getting copied.
1. Compact Form
2. Outline Form
3. Tabular Form
POWER BI
Q1. How to create filters in Power BI?
Answer:
Filters are an integral part of Power BI reports. They are used to slice and dice the data as per the
dimensions we want.
Using Slicers: A slicer is a visual under Visualization Pane. This can be added to the design view
to filter our reports. When a slicer is added to the design view, it requires a field to be added to
it. For example- Slicer can be added for Country fields. Then the data can be filtered based on
countries.
Using Filter Pane: The Power BI team has added a filter pane to the reports, which is a single
space where we can add different fields as filters. These fields can be added depending on
whether you want to filter only one visual (Visual level filter), all the visuals in the report page
(Page level filters), or applicable to all the pages of the report (report level filters).
Q4. Which two cross filter directions are available in Power BI table relationships?
Answer:
When a relationship is created between two different tables in Power BI, then the relationship asks
us the cross-filter direction. There are two options available for cross-filtering.
Single – When the cross-filter direction is single, then the filtering between tables happens from left
table to right table. It is the default setting. The first table can be used to filter the data in the second
table.
Both – When the cross-filter direction is both, then the filtering between the tables will work in both
ways. Either table can be used to filter the other table.
Q7. What is a measure in Power BI, and how do you create one?
Answer:
A measure in Power BI is a calculation applied to data in a report, such as sums, averages, counts, or
custom calculations. Measures are created using the DAX (Data Analysis Expressions) language. To
create a measure, you use the “New Measure” option in Power BI, enter the DAX expression, and give
the measure a name.
Q8. What are the differences between calculated columns and measures in Power BI?
Answer:
Calculated columns are calculated at the row level and stored in the data model, while measures
are calculated based on the context of the visualization and are not stored in the data model.
Calculated columns are static, while measures are dynamic and respond to filters and slicers applied
to the report.
Q9. Can you explain the concept of drill-through in Power BI and give an example?
Answer:
Drill-through in Power BI allows users to navigate from one report page to another to get more
detailed information. For example, if you have a summary dashboard with sales data, users can drill
through to a detailed sales report for a specific product category or time.
Q10. How do you create a dashboard in Power BI, and what are the best practices to follow?
Answer:
To create a dashboard in Power BI, you can pin visualizations from different report pages to a
dashboard canvas. Best practices include using consistent formatting, organizing content logically,
using meaningful titles and descriptions, and keeping the dashboard focused on key metrics.
Q11. How do you use Power Query in Power BI to clean and transform data?
Answer:
Power Query is used in Power BI to clean and transform data before loading it into the data model.
You can use Power Query to remove duplicates, filter rows, rename columns, create custom columns,
pivot and unpivot data, and perform other data cleaning and transformation tasks.
Q13. Can you explain the difference between a table and a matrix visual in Power BI?
Answer:
A table visual in Power BI displays data in a tabular format with rows and columns, while a matrix
visual is like a pivot table and allows you to summarize data by rows and columns, with subtotals and
totals.
Q14. How do you use Power BI to create a report that updates automatically based on new data?
Answer:
In Power BI, you can set up data refresh schedules to automatically update your reports and
dashboards with new data from the data source. You can configure data refresh settings in the
Power BI service or use DirectQuery mode to query data in real-time.
Q15. How do you share your reports and dashboards with others in Power BI?
Answer:
• Use data modelling techniques like data summarization, aggregation, and filtering to reduce the
dataset size.
• Employ Power BI’s query folding feature to push data transformation operations back to the data
source, reducing the amount of data loaded into memory.
• Utilize incremental data loading to only bring in new or updated data instead of loading the entire
dataset each time.
• Implement data compression techniques to reduce the storage footprint of the dataset within
Power BI.
• Consider using DirectQuery mode or connecting to a live dataset for real-time analysis without
importing large datasets into Power BI.
Q17. Can you give an example of a complex data model you have built in Power BI?
Answer:
• Set up scheduled refreshes to automatically update datasets at defined intervals, ensuring data
remains current.
• Configure refresh options such as incremental refresh, which updates only new or modified data,
reducing refresh time for large datasets.
• Monitor refresh performance and optimize queries to improve efficiency.
• Utilize Power BI Gateway to refresh on-premises data sources securely.
• Explore options for refreshing datasets manually or on-demand when immediate updates are
required.
Q18. How do you handle data refreshes in Power BI, and what options are available?
Answer:
• Implement role-based security to control access to specific datasets, reports, or dashboards
based on user roles or groups.
• Utilize row-level security (RLS) to restrict data access at the row level based on user identity or
attributes.
• Secure sensitive data by encrypting data at rest and in transit, leveraging Power BI’s integration
with Azure Active Directory (AAD) for authentication and authorization.
• Ensure compliance with data privacy regulations by applying data masking or anonymization
techniques where necessary.
Q19. How do you handle security and permissions in Power BI?
Answer:
• Data volume limitations: Employ data modeling techniques to reduce dataset size and utilize
incremental refresh for large datasets.
• Data source connectivity: Use custom connectors or consider using Power BI Gateway to con-
nect to on-premises data sources.
• Performance issues: Optimize DAX calculations, minimize visuals and queries, and partition
large datasets for better performance.
• Visualization limitations: Explore custom visuals from AppSource or build custom visuals using
the Power BI SDK to extend visualization capabilities.
Pg. No.11 2021-2024
BRAINALYST - DATA ANALYTICS AND VISUALIZATION INTERVIEW QUESTIONS
Q20. What are some limitations of Power BI, and how would you work around them?
Answer:
• Data volume limitations: Employ data modeling techniques to reduce dataset size and utilize
incremental refresh for large datasets.
• Data source connectivity: Use custom connectors or consider using Power BI Gateway to connect
to on-premises data sources.
• Performance issues: Optimize DAX calculations, minimize visuals and queries, and partition large
datasets for better performance.
• Visualization limitations: Explore custom visuals from AppSource or build custom visuals using
the Power BI SDK to extend visualization capabilities.
• Create a separate drill-through page with detailed information related to the selected data point,
allowing users to explore specific details without cluttering the main report.
• Limit the use of custom visuals, particularly those with heavy computational overhead.
• Opt for DirectQuery or live connection mode for real-time data analysis, especially for large
datasets requiring frequent updates.
Q24. Can you explain the difference between DirectQuery and Import modes in Power BI?
Answer:
• Import Mode: Data from the data source is imported and stored within the Power BI dataset.
Queries and calculations operate on this imported data.
• DirectQuery Mode: Power BI connects directly to the data source at query time, retrieving data
dynamically without importing it. This mode enables real-time or near-real-time analysis but
may impact performance depending on the data source and query complexity.
- Real-World Application: Apply your newfound skills to real-world scenarios, refining your
expertise through practical experience.
Questions on formulas like: SUMIFS, COUNTIFS, LOOKUPS, INDEX & MATCH, AVERAGEIFS. Plus, some
basic questions on pivot tables, conditional formatting, data validation, and charts.
The second one is creating a calculated measure for average using the AVERAGE() DAX function.
-----------------------------------------------------------------------------------------------------------------------------------
Tableau
Q1. What are groups in Tableau?
Answer:
A group is a combination of dimension members that make higher level categories. For example, if
you are working with a view that shows average test scores by major, you may want to group certain
majors together to create major categories.
Q9. Explain the difference between Tableau Desktop and Tableau Server.
Answer:
Tableau Desktop is a desktop application used to create visualizations and dashboards, while Tableau
Server is a web-based platform used to share, collaborate, and manage Tableau content within an
organization. Tableau Desktop is used by analysts and data scientists to create visualizations, whereas
Tableau Server is used by business users to access and interact with these visualizations through a
web browser.
Q23. How do you deploy and manage Tableau dashboards in an enterprise environment?
Answer:
Tableau Server or Tableau Online can be used to deploy and manage Tableau dashboards in an en-
terprise environment. These platforms provide centralized administration, security, and governance
features to manage user access, permissions, and content distribution effectively.
Q24. What is Tableau Prep Builder, and how does it differ from Tableau Desktop?
Answer:
Tableau Prep Builder is a data preparation tool that allows users to visually and interactively clean,
shape, and combine data for analysis. It is used for data preparation tasks such as cleaning, reshap-
ing, and blending data from multiple sources. Tableau Desktop, on the other hand, is primarily used
for data visualization and analysis.
Q26. What is Tableau Data Server, and how does it differ from Tableau Server?
Answer:
Tableau Data Server is a component of Tableau Server that stores and manages Tableau data sources
centrally within an organization. It allows users to publish and share data sources securely across
teams and departments. Tableau Server, on the other hand, is a web-based platform used to share,
collaborate, and manage Tableau workbooks and dashboards.
Q29. What are the different ways to share Tableau visualizations with others?
Answer:
Tableau provides several ways to share visualizations including publishing to Tableau Server or
Tableau Online, embedding visualizations in web pages or applications, exporting visualizations as
static images or PDFs, and sharing Tableau Public visualizations publicly on the web.
Q30. Explain Tableau’s geospatial capabilities and how they can be used in data visualization.
Answer:
Tableau’s geospatial capabilities allow users to create maps and visualize spatial data such as
geographic locations, boundaries, and routes. Users can plot latitude and longitude coordinates on
maps, create custom geocoding, perform spatial analysis, and visualize spatial relationships in data.
Q35. What are Tableau Parameters, and how can they be used in visualizations?
Answer:
Tableau Parameters are dynamic values that users can control to modify aspects of a visualization,
such as filters, calculations, and reference lines. Parameters enable users to create interactive and
flexible visualizations that allow for exploration and analysis.
Q37. What is Tableau’s Table Calculation feature, and how does it differ from regular calculations?
Answer:
Tableau’s Table Calculation feature allows users to perform calculations on the results of a
visualization rather than on the underlying data. Table calculations are computed based on the
visualization’s layout, including filters, sorting, and grouping. They differ from regular calculations,
which are computed on the raw data before visualization.
Q40. Explain the concept of Data Governance in Tableau and its importance.
Answer:
Data Governance in Tableau refers to the processes and policies for managing and ensuring the
quality, security, and integrity of data used in Tableau. It involves establishing standards, roles, and
responsibilities for data management, ensuring compliance with regulations, and maintaining data
privacy and security.
Q41. What are the different deployment options for Tableau Server?
Answer:
Tableau Server can be deployed on-premises, in the cloud (Tableau Online), or in a hybrid
environment. On-premises deployment involves installing Tableau Server on local servers within
an organization’s infrastructure, while Tableau Online is a cloud-based deployment managed by
Tableau. Hybrid deployment combines on-premises and cloud-based components.
Q43. What are the best practices for designing effective Tableau dashboards?
Answer:
Best practices for designing effective Tableau dashboards include designing for the end user,
keeping dashboards simple and focused, using consistent formatting and design principles,
optimizing performance, providing interactivity and context, and iterating based on user feedback.
Q44. Explain the concept of LOD Expressions in Tableau and provide examples of when they might be used.
Answer:
Level of Detail (LOD) Expressions allow users to compute aggregations at different levels of
granularity in Tableau. They can be used to perform calculations independent of the visualization’s
level of detail or to aggregate data at a specific level of granularity. For example, you can use FIXED
LOD expressions to calculate the total sales for a specific category, regardless of other dimensions in
the visualization.
Q45. What is the difference between blending and joining data in Tableau? When would you use each
technique?
Answer:
Data blending in Tableau involves combining data from different data sources on a common field
or key, without modifying the original data sources. Joining data, on the other hand, combines data
from different tables within the same data source based on a common field. Blending is typically used
when data resides in separate data sources, while joining is used when data resides in the same data
source.
Q46. Explain the concept of spatial joins in Tableau and provide an example of when you might use them.
Answer:
Spatial joins in Tableau involve combining spatial data from one dataset with attribute data from
another dataset based on a spatial relationship, such as proximity or containment. For example, you
might use a spatial join to combine a dataset of store locations with a dataset of customer addresses
to determine which customers are closest to each store location.
Q47. What are the different types of filters in Tableau, and when would you use each type?
Answer:
Tableau offers several types of filters, including Extract Filters, Data Source Filters, Context Filters,
Dimension Filters, Measure Filters, Top N Filters, and Relative Date Filters. The choice of filter
depends on the specific filtering requirements and the level at which the filter should be applied.
Q48. Explain the concept of dashboard actions in Tableau and provide examples of how they can be used
to create interactive dashboards.
Answer:
Dashboard actions in Tableau allow users to create interactive dashboards by enabling actions such
as filtering, highlighting, URL actions, and parameter actions. For example, you can use a dashboard
action to filter multiple visualizations based on user selections in one visualization, creating a dynam-
ic and interactive user experience.
Q49. How does Tableau handle security and permissions for data access?
Answer:
Tableau provides several security features, including user authentication, data encryption, row-level
security, and permission-based access controls. Administrators can define user roles and permissions
to control access to data sources, workbooks, and dashboards, ensuring that sensitive data is only
accessible to authorized users.
Q50. Explain the concept of performance optimization in Tableau and provide examples of techniques for
improving dashboard performance.
Answer:
Q51. What are the limitations of Tableau Public, and when might you choose to use Tableau Desktop
instead?
Answer:
Tableau Public is a free version of Tableau that allows users to create and share visualizations publicly
on the web. However, it has limitations such as data size restrictions, limited connectivity to data
sources, and lack of support for certain advanced features. Tableau Desktop, on the other hand, is
a full-featured version of Tableau that offers more advanced functionality and flexibility, making it
suitable for professional use cases.
Q52. How does Tableau integrate with other data visualization and analytics tools?
Answer:
Tableau integrates with a variety of data visualization and analytics tools, including R, Python,
MATLAB, and SAS. These integrations allow users to leverage advanced analytics and statistical
modeling capabilities within Tableau, enhancing the depth and sophistication of their analyses.
Q53. Can you explain the process of publishing Tableau workbooks to Tableau Server, and how
permissions are managed?
Answer:
Publishing Tableau workbooks to Tableau Server involves saving the workbook to the Tableau Server
repository, where it can be accessed by other users with appropriate permissions. Administrators can
manage permissions at the workbook, project, and server levels, controlling who can view, edit, or
publish content on the server.
- In terms of cost, Power BI is often seen as more affordable than Tableau, particularly for small to
medium-sized businesses.
- Ultimately, the choice between Tableau and Power BI will depend on your specific needs
and preferences, as well as your budget. If you value ease-of-use and powerful visualization
capabilities, Tableau might be the better choice. If you value collaboration and integration with
other Microsoft products, Power BI might be the better choice.
Numerical values
Q58. How Do You Calculate the Daily Profit Measures Using LOD?
Answer:
LOD expressions allow us to easily create bins on aggregated data such as profit per day.
Scenario: We want to measure our success by the total profit per business day.
Create a calculated field named LOD - Profit per day and enter the formula:
Create another calculated field named LOD - Daily Profit KPI and enter the formula:
ELSE “Profitable”
END
To calculate daily profit measure using LOD, follow these steps to draw the visualization:
Drag Order Id field to Rows shelf. Right-click on it, select Measure and click on Count(Distinct)
Bring LOD - Daily Profit KPI to marks card and change mark type from automatic to area.
Q60. How is the grid search parameter different from the random search?
Answer:
Model Hyperparameter tuning is very useful to enhance the performance of a machine learning
model. The only difference between both the approaches is in grid search we define the combina-
tions and do training of the model whereas in RandomizedSearchCV the model selects the combi-
nations randomly. Both are very effective ways of tuning the parameters that increase the model
generalizability.
Random search is a technique where random combinations of the hyperparameters are used to find
the best solution for the built model. The drawback of random search is that it yields high variance
during computing. Since the selection of parameters is completely random; and since no intelligence
is used to sample these combinations, luck plays its role.
Q62. Explain the Difference Between Tableau Worksheet, Dashboard, Story, and Workbook?
Answer:
Tableau uses a workbook and sheet file structure, much like Microsoft Excel.
A workbook contains sheets, which can be a worksheet, dashboard, or a story.
A worksheet contains a single view along with shelves, legends, and the Data pane.
A dashboard is a collection of views from multiple worksheets.
A story contains a sequence of worksheets or dashboards that work together to convey information.
Q67. What Would You Do If Some Countries/Provinces (Any Geographical Entity) are Missing and
Displaying a Null When You Use Map View in Tableau?
Answer:
When working with maps and geographical fields, unknown or ambiguous locations are identified by
the indicator in the lower right corner of the view.
Click the indicator and choose from the following options:
Edit Locations - correct the locations by mapping your data to known locations
Filter Data - exclude the unknown locations from the view using a filter. The locations will not be
included in calculations
Show Data at Default Position - show the values at the default position of (0, 0) on the map.
Database
Q1. Write a sql query to get emp id and department for each department who recently joined the
organization and still in working.
table name - employee
columns - emp id, first name, last name, date of join, date of exit, department.
Answer:
SELECT emp_id, department
FROM employee
WHERE date_of_join = (SELECT MAX(date_of_join) FROM employee WHERE department =
e.department AND date_of_exit IS NULL)
Q2. Write a sql query to get the days which is having temperature greater than previous day
table name - A
columns - temp , days
Answer:
SELECT days
FROM (
SELECT days, temp,
LAG(temp) OVER (ORDER BY days) AS prev_temp
FROM A
) AS subquery
WHERE temp > prev_temp;
Q3. Write a sql query to get the sum of earnings of each employee excluding the last month salary.
table name - A
columns - Employee, month, earning
Answer:
SELECT Employee, SUM(earning) AS Total_Earnings
FROM A
GROUP BY Employee;
Q4. Outputs of Left, Right, Inner and outer join from two tables having duplicate rows.
Answer:
For Example:-
Left table A-
Column
1
1
1
2
2
3
4
5
Right table B-
Column
1
1
2
2
2
3
3
3
4
Tell the no. of rows as output of all joins for above table A & B
Q5. Write a query to get mean, median and mode for earning?
table - A
coulumns - emp, earning
Answer:
SELECT
AVG(earning) AS mean_earning,
PERCENTILE_CONT(0.5) WITHIN GROUP (ORDER BY earning) AS median_earning,
MODE() WITHIN GROUP (ORDER BY earning) AS mode_earning
FROM
A;
Q6: Consider a table named “Orders” with the following columns: OrderID, OrderDate, CustomerID. Write
a SQL query to find the customers who have placed orders on consecutive days.
Answer:
SELECT DISTINCT o1.CustomerID
FROM Orders o1
JOIN Orders o2 ON o1.CustomerID = o2.CustomerID
AND DATEDIFF(o2.OrderDate, o1.OrderDate) = 1;
Q7: You have three tables: “Employees,” “Departments,” and “Salaries.” The “Employees” table has
the following columns: EmployeeID, EmployeeName, DepartmentID. The “Departments” table has the
following columns: DepartmentID, DepartmentName. The “Salaries” table has the following columns:
EmployeeID, Salary, EffectiveDate. Write a SQL query to retrieve the employee who has had the highest
salary increase within the last year, along with their name, department, and the percentage increase.
Answer:
SELECT e.EmployeeName, d.DepartmentName,
((MAX(s.Salary) - MIN(s.Salary)) / MIN(s.Salary)) * 100 AS SalaryIncreasePercentage
FROM Employees e
JOIN Departments d ON e.DepartmentID = d.DepartmentID
JOIN Salaries s ON e.EmployeeID = s.EmployeeID
WHERE s.EffectiveDate >= DATEADD(year, -1, GETDATE())
GROUP BY e.EmployeeName, d.DepartmentName
ORDER BY SalaryIncreasePercentage DESC
LIMIT 1;
Q8: You have a table named “Logs” with the following columns: LogID, LogTime, UserID. Write a SQL
query to find the top 5 users who have logged in the most consecutive days, along with the number of
consecutive days.
Answer:
SELECT UserID, COUNT(*) AS ConsecutiveDays
FROM (
SELECT UserID,
FROM Logs
) AS Subquery
LIMIT 5;
Q9: Consider a table named “Transactions” with the following columns: TransactionID, TransactionDate,
Amount, UserID. Write a SQL query to calculate the average transaction amount for each user, including
users who have no transactions, and display the result as zero for those users.
Answer:
SELECT UserID,
COALESCE(AVG(Amount), 0) AS AverageTransactionAmount
FROM Transactions
GROUP BY UserID;
Q10: You have two tables: “Customers” and “Purchases.” The “Customers” table has the following
columns: CustomerID, CustomerName. The “Purchases” table has the following columns: PurchaseID,
PurchaseDate, CustomerID, ProductID. Write a SQL query to find the customers who have purchased all
products.
Answer:
SELECT c.CustomerID, c.CustomerName
FROM Customers c
SELECT p.ProductID
FROM Products p
SELECT *
FROM Purchases pu
);
Many-to-Many - This is used in cases when multiple instances on both sides are needed for defining
a relationship.
Self-Referencing Relationships - This is used when a table needs to define a relationship with itself.
The basic syntax of the UPDATE query with a WHERE clause is as follows −
UPDATE table_name
SET column1 = value1, column2 = value2...., columnN = valueN
WHERE [condition];
Implicit Cursors are also known as Default Cursors of SQL SERVER. These Cursors are allocated
by SQL SERVER when the user performs DML operations.
Explicit Cursors :
Explicit Cursors are Created by Users whenever the user requires them. Explicit Cursors are used
for Fetching data from Table in Row-By-Row Manner.
Q18. What are the advantages and disadvantages of views in the database?
Answer:
Advantages of Views:
As there is no physical location where the data in the view is stored, it generates output without
wasting resources.
Data access is restricted as it does not allow commands like insertion, updation, and deletion.
Disadvantages of Views:
The view becomes irrelevant if we drop a table related to that view.
Much memory space is occupied when the view is created for large tables.
Q20. What are the advantages and disadvantages of views in the database?
Answer:
Advantages of Views:
As there is no physical location where the data in the view is stored, it generates output without
wasting resources.
Data access is restricted as it does not allow commands like insertion, updation, and deletion.
Disadvantages of Views:
Much memory space is occupied when the view is created for large tables.
Q21. Describe the Difference Between Window Functions and Aggregate Functions in SQL.
Answer:
The main difference between window functions and aggregate functions is that aggregate functions
group multiple rows into a single result row; all the individual rows in the group are collapsed and
their individual data is not shown. On the other hand, window functions produce a result for each
individual row. This result is usually shown as a new column value in every row within the window.
Q22. Write a SQL query to find the top three products with the highest revenue in the last quarter from a
sales database.
Answer:
A SQL query to find the top three products with the highest revenue in the last quarter:
SELECT TOP 3 ProductID, SUM(Revenue) AS TotalRevenue
FROM Sales
GROUP BY ProductID
F. RPAD: For a left-justified value, it returns the padding of the right-side character value.
G. TRIM: This function removes all defined characters from the beginning, end, or both ends of a
string. It also reduced the amount of wasted space.
H. REPLACE: This function replaces all instances of a word or a section of a string (substring) with
the other string value specified.
Q37. What are the different integrity rules present in the DBMS?
Answer:
The different integrity rules present in DBMS are as follows:
Entity Integrity: This rule states that the value of the primary key can never be NULL. So, all the
tuples in the column identified as the primary key should have a value.
Referential Integrity: This rule states that either the value of the foreign key is NULL or it should be
the primary key of any other relation.
1. Explain data cleansing.
Data cleaning, also known as data cleansing or data scrubbing or wrangling, is basically a
process of identifying and then modifying, replacing, or deleting the incorrect, incomplete,
inaccurate, irrelevant, or missing portions of the data as the need arises. This fundamental
element of data science ensures data is correct, consistent, and usable.
An Affinity Diagram is an analytical tool used to cluster or organize data into subgroups based
on their relationships. These data or ideas are mostly generated from discussions or brain-
storming sessions and are used in analyzing complex issues.
Q41. If we drop a table, does it also drop related objects like constraints, indexes, columns, default,
views and sorted procedures?
Answer:
Yes, SQL server drops all related objects, which exists inside a table like constraints, indexes, columns,
defaults etc. But dropping a table will not drop views and sorted procedures as they exist outside the
table.
Q48. Describe the Difference Between Window Functions and Aggregate Functions in SQL.
Answer:
The main difference between window functions and aggregate functions is that aggregate functions
group multiple rows into a single result row; all the individual rows in the group are collapsed and
their individual data is not shown. On the other hand, window functions produce a result for each
individual row. This result is usually shown as a new column value in every row within the window.
Q49. What is the difference between the RANK() and DENSE_RANK() functions?
Answer:
The RANK() function in the result set defines the rank of each row within your ordered partition.
If both rows have the same rank, the next number in the ranking will be the previous rank plus a
number of duplicates. If we have three records at rank 4, for example, the next level indicated is
7. The DENSE_RANK() function assigns a distinct rank to each row within a partition based on the
provided column value, with no gaps. If we have three records at rank 4, for example, the next level
indicated is 5.
-----------------------------------------------------------------------------------------------------------------------------------
- Importing data from various sources (Excel, databases, cloud platforms, etc.)
- Understanding data types and roles in Alteryx
- Preparing and cleaning data using Input and Data Cleansing tools
- Utilizing Parse tools for complex data manipulation (Text to Columns, RegEx, XML and JSON parsing
- Data parsing and transformation with the Multi-Field Formula tool
- Advanced data preparation techniques using Fuzzy Matching and Data Cleansing tools
Excel:
------------------------------------------------------------------------------------------------------------------------------
16. Describe the VLOOKUP function and when you would use it.
18. Explain the difference between COUNT, COUNTA, COUNTBLANK, and COUNTIF functions.
21. Describe the INDEX and MATCH functions and when they are used.
33. Describe the purpose of the SUMPRODUCT function and provide an example.
51. How do you import data from external sources into Excel?
Excel Shortcuts:
71. How do you apply the currency format to a cell using a shortcut?
74. What is the shortcut to switch between relative, absolute, and mixed cell references in a formula?
10. What is the difference between a For...Next loop and a Do...Loop in VBA?
23. What is the purpose of the Resume statement in VBA error handling?
26. What is the difference between ByVal and ByRef in VBA function arguments?
29. How do you loop through all worksheets in a workbook using VBA?
40. How do you write VBA code to handle events on a user form?
1. Imagine you have a dataset of sales transactions. How would you use Excel to calculate the total sales
revenue?
2. Suppose you have a list of employee names and their respective salaries. How would you find the
average salary using Excel?
3. You have a dataset with missing values. How would you handle missing data in Excel?
4. Imagine you have a list of product prices and quantities sold. How would you calculate the total revenue
using Excel?
5. Suppose you have a dataset with duplicate entries. How would you remove duplicates using Excel?
6. You need to create a report summarizing quarterly sales performance. How would you use Excel to
accomplish this task?
7. Imagine you have a dataset with multiple sheets. How would you consolidate the data using Excel?
8. You have a list of customer names and their corresponding purchase dates. How would you calculate the
average time between purchases using Excel?
9. Suppose you have a dataset with text entries in uppercase. How would you convert them to lowercase
using
Tableau Questions:
Q1. What are the different types of joins available in Tableau, and when would you use each type?
Q2. How do you handle data security and permissions in Tableau Server?
Q3. Explain the concept of dashboard actions in Tableau and provide examples of how they can be used
to enhance interactivity.
Q4. What are the different types of data connections available in Tableau?
Q5. Can you explain the Tableau data engine?
Q6. What are the different file types that can be connected in Tableau?
Q7. What is a Tableau workbook and what does it contain?
Q8. What is the difference between a measure and a dimension in Tableau?
Q9. What is a calculated field in Tableau?
Q10. Can you explain how to create a hierarchy in Tableau?
Q11. How do you blend data in Tableau?
Q12. What is the difference between a join and a blend in Tableau?
Q13. How do you handle missing values in Tableau?
Q14. Can you explain Tableau parameters?
Q15. How do you create a map in Tableau?
Q16.Can you explain the difference between a heat map and a tree map in Tableau?
Q17. How do you create a calculated field using a LOD (Level of Detail) expression in Tableau?
Q18. Can you explain the difference between a table calculation and a calculated field in Tableau?
Q19. How do you create a dashboard in Tableau?
Q20. Can you explain Tableau actions?
Q21. What is a context filter in Tableau?
Q22. How do you optimize performance in Tableau?
Q23. Can you explain the Tableau Server architecture?
Q24. How do you publish a workbook in Tableau Server?
Q25. What is a Tableau extract?
Q26. Can you explain the difference between a live connection and an extract in Tableau?
Q27. What is a Tableau data source?
Q28. How do you schedule refreshes in Tableau Server?
Q29. What is the difference between a quick filter and a normal filter in Tableau?
Q30. How do you create a parameter control in Tableau?
Q31. Can you explain the Tableau file types and extensions?
Q32. How do you create a combined axis in Tableau?
Q33. Can you explain Tableau groups?
Q34. What is a reference line in Tableau?
Q35. How do you create a calculated field using a table calculation in Tableau?
Q36. How do you create a dual axis chart in Tableau?
Q37. How do you create a histogram in Tableau?
Q38. What is a dimension hierarchy in Tableau?
Q39. How do you create a calculated field using a date function in Tableau?
Q40. How do you create a drill-down report in Tableau?
Q41. How do you create a scatter plot in Tableau?
Q42. How do you create a calculated field using an aggregate function in Tableau?
Q43. Can you explain the Tableau Desktop interface?
Q44. How do you use filters in Tableau?
Q45. How do you create a bar chart in Tableau?
Q46. Can you explain the difference between a discrete and continuous field in Tableau
Q47. How do you create a calculated field using a logical function in Tableau?
Q48. What is a parameter control in Tableau and how is it used?
Q49. How do you create a box-and-whisker plot in Tableau?
Q50. Can you explain the difference between a trend line and a reference line in Tableau?
Q51. How do you create a calculated field using a string function in Tableau?
Q52. How do you create a pie chart in Tableau?
1. Data Import Scenario: Describe how you would import data from various sources (Excel, SQL Server, CSV)
into Tableau.
2. Data Cleaning Exercise: In Tableau, how would you handle a dataset with missing values and inconsistent
formats to prepare it for analysis?
3. Handling Large Datasets: If you’re working with a very large dataset in Tableau that is causing
performance issues, what strategies would you use to optimize the data processing?
4. Calculated Fields Challenge: Explain how you would use calculated fields in Tableau to analyze year-over-
year growth.
5. Data Blending Case: You have sales data in one table and customer data in another. How would you blend
these data sources in Tableau to analyze customer purchase behavior?
6. Visualizations Task: Describe your approach to visualizing sales data in Tableau to highlight trends over
time across different product categories.
7. Dashboard Optimization: A Tableau dashboard is loading slowly. What steps would you take to diagnose
and improve its performance?
8. Data Refreshes Scheduling: How would you set up and manage automatic data refreshes for a weekly
sales report in Tableau?
9. User Filters for Security: How would you implement user-level security in Tableau for a report that needs
different access levels for various users?
10. Troubleshooting a Calculation: If a calculated field in Tableau is not returning the expected results, how
would you go about troubleshooting it?
11. Integration with Other Tools: Describe a scenario where you integrated Tableau with another tool or
service (like Excel or a web API).
12. Interactive Reports Creation: How would you design a Tableau report that allows user interaction, such
as using filters or drill-down features?
13. Adapting to Data Source Changes: If there are structural changes in a primary data source (like addition
or removal of columns), how would you update your Tableau reports and dashboards?
14. Managing Tableau Server/Online: Explain how you would share a report with your team and set up
access controls using Tableau Server or Tableau Online.
15. SQL Queries in Tableau: How do you use SQL queries in Tableau for advanced data transformation or
analysis?
16. Error Handling in Data Sources: How do you manage and resolve errors in data sources or calculations in
Tableau?
17. Custom Visuals Usage: Have you used custom visuals in Tableau? Describe the scenario and the benefits.
18. Tableau Template Application: Provide an example of a situation where you created or used a Tableau
template. What advantages did this offer?
19. Collaboration in Tableau Projects: Discuss how you have worked with others on a Tableau project. What
collaboration tools or features within Tableau did you utilize?
PowerBI Questions
1. What is Power BI, and how does it differ from other business intelligence tools?
2. Can you explain the various components of Power BI Desktop and their respective functions?
3. How do you import data into Power BI, and what types of data sources does it support?
4. Describe the process of transforming data in Power BI, including common data cleaning and shaping
techniques.
5. What are relationships in Power BI, and how do you manage them to create effective data models?
6. How do you create calculated columns and measures in Power BI, and what are the differences between
them?
7. Can you explain the concept of DAX (Data Analysis Expressions) in Power BI, and how is it used?
8. What are the different visualization types available in Power BI, and when would you use each one?
9. How do you customize and format visualizations in Power BI to enhance their appearance and usability?
10. Explain the process of creating calculated tables and calculated fields in Power BI.
11. How do you create and manage hierarchies in Power BI, and why are they useful?
12. What are slicers and how do you use them to filter data in Power BI reports?
13. Describe the process of creating and using bookmarks in Power BI to save and navigate between report
views.
14. What is the role of Power Query Editor in Power BI, and how do you use it to manipulate data?
15. How do you publish Power BI reports to the Power BI Service, and what are the benefits of doing so?
16. Can you explain the concept of row-level security in Power BI, and how is it implemented?
17. What are the different deployment options available for Power BI, and how do they differ?
18. How do you schedule data refreshes in Power BI to ensure that reports are up to date?
19. What are Power BI Apps, and how do they facilitate collaboration and sharing of reports within
organizations?
20. Describe some advanced features or functionalities in Power BI that you have used in your projects, and
how did they add value?
Database Questions:
2. Can you explain the difference between a relational database and a non-relational (NoSQL) database?
7. What are the different types of database joins, and how do they work?
8. How do you optimize database performance, and what techniques can be used?
10. Describe the ACID properties of database transactions and their importance.
11. What is a foreign key, and how is it used to establish relationships between tables?
12. Can you explain the differences between a clustered and non-clustered index?
13. What is the purpose of stored procedures, and how are they different from SQL queries?
14. Describe the concept of database transactions and explain their role in ensuring data consistency.
15. What are the different types of database backups, and how do you implement them?
16. Explain the concept of database replication and its use cases.
18. Can you explain the differences between OLTP (Online Transaction Processing) and OLAP (Online
Analytical Processing) databases?
19. What is data warehousing, and how does it differ from traditional database systems?
20. Describe the process of database migration and the challenges associated with it.
-----------------------------------------------------------------------------------------------------------------------------------