Nsight Inc
The Sleep Company Interview Questions and Answers
Q1. Difference between AS and IS in Procedure
AS is used to assign an alias to a column or table in SQL, while IS is used to compare values or check for null values.
AS is used in SELECT statements to assign a temporary name to a column or table
AS can also be used in JOIN statements to assign aliases to tables
IS is used in WHERE clauses to compare values or check for null values
IS NULL is used to check if a value is null
IS NOT NULL is used to check if a value is not null
Q2. How do you design an APIGateway and 3 Microservices in your project?
Designing an APIGateway and 3 Microservices involves defining endpoints, communication protocols, and service interactions.
Define the endpoints for the APIGateway to route requests to the appropriate microservices.
Choose communication protocols such as REST or gRPC for interactions between services.
Implement service discovery and load balancing for efficient communication.
Ensure security measures like authentication and authorization are in place.
Use tools like Swagger for AP...read more
Q3. Tell practical implementation of Design pattern in your project code?
Implemented Singleton design pattern in a project to ensure only one instance of a class is created.
Used a private constructor to prevent instantiation of the class from outside.
Created a static method to provide a single point of access to the instance.
Stored the single instance as a private static variable within the class.
Ensured thread safety by using synchronized keyword or double-checked locking.
Q4. 1. Use of with cluse
WITH clause is used to define a temporary result set that can be used in a subsequent SQL statement.
WITH clause is also known as Common Table Expression (CTE)
It improves the readability and maintainability of complex SQL queries
It can be used to simplify complex queries by breaking them down into smaller, more manageable parts
It can be used to create recursive queries
Example: WITH sales AS (SELECT * FROM sales_data) SELECT * FROM sales WHERE amount > 1000;
Example: WITH recurs...read more
Q5. Use of Case condition
Case condition is used to perform conditional logic in SQL queries.
It allows for conditional statements in SELECT, WHERE, and ORDER BY clauses.
Syntax: CASE WHEN condition THEN result ELSE alternative END
Can be nested for complex logic
Useful for data transformation and reporting
Q6. Use of NTILE in sql
NTILE is a SQL function used to divide a result set into a specified number of groups.
NTILE requires an integer argument that specifies the number of groups to divide the result set into.
It assigns a group number to each row in the result set based on the specified number of groups.
NTILE is often used in conjunction with the ORDER BY clause to divide the result set based on a specific column.
NTILE can be used to calculate percentiles by dividing the result set into 100 groups...read more
Q7. How do you check network teaming
Network teaming can be checked using tools like ethtool, nmcli, and ifconfig.
Use ethtool to check the status of network interfaces and teaming configuration
Use nmcli to view and manage network teaming settings
Check the output of ifconfig to verify the network teaming configuration
Q8. How do you increase or reduce lvm
To increase or reduce LVM, you can use the lvextend or lvreduce commands.
To increase LVM, use the lvextend command with the desired size parameter
To reduce LVM, use the lvreduce command with the desired size parameter
Make sure to resize the filesystem after increasing or reducing LVM using resize2fs or xfs_growfs
Interview Process at The Sleep Company
Top Interview Questions from Similar Companies
Reviews
Interviews
Salaries
Users/Month