Paytm
10+ R.R. Donnelley Interview Questions and Answers
Q1. Sum of Squares of First N Natural Numbers Problem Statement
You are tasked with finding the sum of squares of the first N
natural numbers for given test cases.
Input:
The first line contains an integer 'T', the...read more
The task is to find the sum of squares of the first 'N' natural numbers.
Iterate from 1 to N and calculate the square of each number
Add all the squares together to get the final sum
Return the sum as the result
The order of execution of SQL clauses is: SELECT, FROM, WHERE, GROUP BY, HAVING, ORDER BY.
The SELECT clause is executed first to retrieve the desired columns from the table.
The FROM clause is executed next to specify the table(s) from which the data is retrieved.
The WHERE clause is executed after the FROM clause to filter the rows based on specified conditions.
The GROUP BY clause is executed to group the rows based on specified columns.
The HAVING clause is executed after the ...read more
To find the count of visitors and new visitors that came today in a database management system (DBMS).
Use a query to filter the visitors based on the current date.
Count the total number of visitors using the COUNT function.
To find new visitors, compare the current date with the date of their first visit.
Use the DISTINCT keyword to count only unique new visitors.
Underfitting and overfitting are common problems in machine learning models.
Underfitting occurs when a model is too simple and fails to capture the underlying patterns in the data.
Overfitting happens when a model is too complex and learns the noise or random fluctuations in the training data.
Underfitting leads to high bias and low variance, while overfitting leads to low bias and high variance.
To address underfitting, we can increase model complexity, gather more data, or use...read more
The query finds the highest salary for each department.
Use the GROUP BY clause to group the employees by department.
Use the MAX() function to find the highest salary for each department.
Combine the MAX() function with the GROUP BY clause to get the department wise highest salary.
To find the salary of each employee per month, you need access to a database management system (DBMS) that stores employee data.
Access the DBMS and locate the table that stores employee information.
Identify the column that contains the salary information.
Retrieve the salary data for each employee and calculate the monthly salary.
Store the monthly salary information in a suitable data structure, such as an array of strings.
Random Forest is an ensemble learning method that combines multiple decision trees to make predictions.
Random Forest is a supervised learning algorithm used for both classification and regression tasks.
It creates a multitude of decision trees and combines their predictions to make a final prediction.
Each decision tree is trained on a random subset of the training data and features.
Random Forest reduces overfitting and improves accuracy compared to a single decision tree.
It ca...read more
Q8. what are diiferent types of join in sql ?
Different types of joins in SQL include inner join, left join, right join, and full outer join.
Inner join: Returns rows when there is at least one match in both tables.
Left join: Returns all rows from the left table and the matched rows from the right table.
Right join: Returns all rows from the right table and the matched rows from the left table.
Full outer join: Returns rows when there is a match in one of the tables.
Q9. How can you be helpful to organisation?
I can be helpful to the organization by analyzing data, identifying trends, and providing insights to support decision-making.
Conduct thorough data analysis to identify patterns and trends
Generate reports and presentations to communicate findings to stakeholders
Collaborate with cross-functional teams to provide insights and recommendations
Utilize tools such as Excel, SQL, and Tableau to analyze and visualize data
Q10. Difference between rank and dense_rank ?
Rank assigns unique ranks to each distinct row, while dense_rank assigns consecutive ranks to rows with the same values.
Rank leaves gaps in rank numbers if there are ties, while dense_rank does not
Rank function is used to assign unique ranks to each distinct row in the result set
Dense_rank function is used to assign consecutive ranks to rows with the same values
Example: If there are two rows with the same value, rank would assign them ranks 1 and 2, while dense_rank would ass...read more
Q11. How group by function works ?
Group by function is used to group data based on a specific column or expression.
Group by function is used in SQL to aggregate data based on a specific column.
It is often used with aggregate functions like SUM, COUNT, AVG, etc.
For example, SELECT department, SUM(salary) FROM employees GROUP BY department will group employees by department and calculate the total salary for each department.
Q12. How SQL joins work ?
SQL joins are used to combine rows from two or more tables based on a related column between them.
SQL joins are used to retrieve data from multiple tables based on a related column between them.
Types of SQL joins include INNER JOIN, LEFT JOIN, RIGHT JOIN, and FULL JOIN.
INNER JOIN returns rows when there is at least one match in both tables.
LEFT JOIN returns all rows from the left table and the matched rows from the right table.
RIGHT JOIN returns all rows from the right table ...read more
Top HR Questions asked in R.R. Donnelley
Interview Process at R.R. Donnelley
Top Business Analyst Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month