BI Consultant

BI Consultant Interview Questions and Answers

Updated 15 Jun 2021

Q1. What are views, functions, stored procedures

Ans.

Views, functions, and stored procedures are database objects used to manipulate and retrieve data.

  • Views are virtual tables that display data from one or more tables in a specific way.

  • Functions are reusable code blocks that perform a specific task and return a value.

  • Stored procedures are precompiled SQL statements that can be executed with parameters.

  • All three objects can improve performance and simplify complex queries.

  • Examples include creating a view to display only certain ...read more

Q2. Write a query to get salary based on tenure of employees

Ans.

Query to retrieve salary based on employee tenure

  • Use the DATEDIFF function to calculate the tenure of each employee

  • Join the employee and salary tables on the employee ID

  • Filter the results based on the tenure of the employee

  • Select the employee name and salary

Q3. Difference between where and having clause

Ans.

WHERE clause filters rows before grouping and HAVING clause filters groups after grouping.

  • WHERE clause is used to filter rows based on a condition

  • HAVING clause is used to filter groups based on a condition

  • WHERE clause is used with SELECT, UPDATE, DELETE statements

  • HAVING clause is used with GROUP BY clause

  • WHERE clause is executed before GROUP BY clause

  • HAVING clause is executed after GROUP BY clause

Q4. Write a query to get manager commission based on employee commission

Ans.

Query to calculate manager commission based on employee commission

  • Join the employee and manager tables on the manager ID

  • Calculate the total commission earned by each employee

  • Calculate the total commission earned by all employees under each manager

  • Calculate the manager commission as a percentage of the total employee commission

  • Return the manager name and commission amount

Are these interview questions helpful?

Q5. What are triggers

Ans.

Triggers are database objects that automatically execute in response to certain events or changes in data.

  • Triggers can be used to enforce business rules and data integrity

  • They can be used to audit changes to data

  • Triggers can be used to replicate data to other systems

  • Examples of events that can trigger a trigger include INSERT, UPDATE, and DELETE statements

Q6. Delete duplicate rows

Ans.

To delete duplicate rows, use the DISTINCT keyword or GROUP BY clause.

  • Use the DISTINCT keyword to select unique rows from a table.

  • Use the GROUP BY clause to group rows with the same values together.

  • Use the HAVING clause to filter out groups with more than one row.

  • Use the DELETE statement with a subquery to delete duplicate rows.

  • Example: DELETE FROM table_name WHERE id NOT IN (SELECT MIN(id) FROM table_name GROUP BY column_name);

Share interview questions and help millions of jobseekers 🌟

man-with-laptop

BI Consultant Jobs

BI Consultant 3-5 years
Adobe Systems India Pvt. Ltd.
4.0
Noida
ODBI Consultant - Contract 8-13 years
ACCELALPHA SOFTWARE PRIVATE LIMITED
3.6
Bangalore / Bengaluru
BI Consultant 2-6 years
Swarovski
4.1
Pune
Interview Tips & Stories
Ace your next interview with expert advice and inspiring stories

Interview experiences of popular companies

3.7
 • 441 Interviews
View all

Calculate your in-hand salary

Confused about how your in-hand salary is calculated? Enter your annual salary (CTC) and get your in-hand salary

BI Consultant Interview Questions
Share an Interview
Stay ahead in your career. Get AmbitionBox app
qr-code
Helping over 1 Crore job seekers every month in choosing their right fit company
65 L+

Reviews

4 L+

Interviews

4 Cr+

Salaries

1 Cr+

Users/Month

Contribute to help millions
Get AmbitionBox app

Made with ❤️ in India. Trademarks belong to their respective owners. All rights reserved © 2024 Info Edge (India) Ltd.

Follow us
  • Youtube
  • Instagram
  • LinkedIn
  • Facebook
  • Twitter
Profile Image
Hello, Guest
Awards 2025
Contribute to help millions!
Write a review
Write a review
Share interview
Share interview
Contribute salary
Contribute salary
Add office photos
Add office photos
Add office benefits
Add office benefits
Stay ahead in your career with AmbitionBox app